diff options
author | matt handler <matt.handler@gmail.com> | 2011-04-26 17:21:39 -0400 |
---|---|---|
committer | matt handler <matt.handler@gmail.com> | 2011-04-26 17:21:39 -0400 |
commit | 1ee16b02d54bd8c71ae365bdb56d7389702839ea (patch) | |
tree | 1b05910b89d0fc3a788d1f9d3e888d53082bf669 /Classes/PhotoViewController.m | |
parent | 46642320901ebaaedae5618e423ebfe70f316351 (diff) | |
download | piccast-app-1ee16b02d54bd8c71ae365bdb56d7389702839ea.tar.gz piccast-app-1ee16b02d54bd8c71ae365bdb56d7389702839ea.zip |
sort topics when popping out of the database, customize photoview controller, need to add sharekit
Diffstat (limited to 'Classes/PhotoViewController.m')
-rw-r--r-- | Classes/PhotoViewController.m | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/Classes/PhotoViewController.m b/Classes/PhotoViewController.m index 1b43094..151aabd 100644 --- a/Classes/PhotoViewController.m +++ b/Classes/PhotoViewController.m @@ -8,6 +8,59 @@ #import "PhotoViewController.h" #import "PhotoSource.h" +#import <Three20/Three20.h> + +@interface MyPhotoViewController : TTPhotoViewController +{ + +} +@end + +@implementation MyPhotoViewController + +-(void)viewDidLoad{ + // New item to be added + UIBarButtonItem *shareItem = [[UIBarButtonItem alloc] + initWithTitle:@"Share" style:UIBarButtonItemStyleBordered target:self + action:@selector(action:)]; + UIBarButtonItem *customItem = [[UIBarButtonItem alloc] + initWithTitle:@"Save" style:UIBarButtonItemStyleBordered target:self + action:@selector(action:)]; + // Flex space to keep the back / forward arrows centered + UIBarButtonItem *flex = [[UIBarButtonItem alloc] + initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace + target:nil action:nil]; + UIBarButtonItem *flex2 = [[UIBarButtonItem alloc] + initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace + target:nil action:nil]; + // Create array with items starting with the left side + NSMutableArray *items = [NSMutableArray arrayWithObject:shareItem]; + [items addObject:flex]; + // Then add the current items (the back / forward arrows) + [items addObjectsFromArray:[_toolbar items]]; + [items addObject:flex2]; + // Add in our new item to the far right + [items addObject:customItem]; + [_toolbar setItems:items]; + [shareItem release]; + [customItem release]; + [flex release]; + [flex2 release]; +} + +-(void)action:(id)sender{ + // Perform your action +} + +@end + + +@implementation TTThumbsViewController (test) +- (TTPhotoViewController*)createPhotoViewController { + NSLog(@"test"); + return (TTPhotoViewController *)[[[MyPhotoViewController alloc] init] autorelease]; +} +@end @implementation PhotoViewController |