diff options
Diffstat (limited to 'Juick')
15 files changed, 102 insertions, 12 deletions
diff --git a/Juick/AppDelegate.h b/Juick/AppDelegate.h index 087b6fd..0b1fbb7 100644 --- a/Juick/AppDelegate.h +++ b/Juick/AppDelegate.h @@ -13,6 +13,6 @@ @interface AppDelegate : UIResponder <UIApplicationDelegate> @property (strong, nonatomic) UIWindow *window; -@property (strong, nonatomic) SWRevealViewController *viewController; +@property (strong, nonatomic) UIViewController *viewController; @end diff --git a/Juick/AppDelegate.m b/Juick/AppDelegate.m index f59ff02..28bacc9 100644 --- a/Juick/AppDelegate.m +++ b/Juick/AppDelegate.m @@ -30,12 +30,18 @@ UINavigationController *main = [[UINavigationController alloc] initWithRootViewController:messages]; UINavigationController *rearNav = [[UINavigationController alloc] initWithRootViewController:rear]; - - SWRevealViewController *reveal = [[SWRevealViewController alloc] initWithRearViewController:rearNav frontViewController:main]; - self.viewController = reveal; + if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) { + SWRevealViewController *reveal = [[SWRevealViewController alloc] initWithRearViewController:rearNav frontViewController:main]; + self.viewController = reveal; + } else { + UISplitViewController *split = [[UISplitViewController alloc] init]; + split.viewControllers = [NSArray arrayWithObjects:rearNav, main, nil]; + split.delegate = messages; + self.viewController = split; + } self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; - self.window.rootViewController = reveal; + self.window.rootViewController = self.viewController; [self.window makeKeyAndVisible]; return YES; diff --git a/Juick/Images.xcassets/AppIcon.appiconset/AppIcon29x29-1.png b/Juick/Images.xcassets/AppIcon.appiconset/AppIcon29x29-1.png Binary files differnew file mode 100644 index 0000000..c17b09a --- /dev/null +++ b/Juick/Images.xcassets/AppIcon.appiconset/AppIcon29x29-1.png diff --git a/Juick/Images.xcassets/AppIcon.appiconset/AppIcon29x29.png b/Juick/Images.xcassets/AppIcon.appiconset/AppIcon29x29.png Binary files differnew file mode 100644 index 0000000..c17b09a --- /dev/null +++ b/Juick/Images.xcassets/AppIcon.appiconset/AppIcon29x29.png diff --git a/Juick/Images.xcassets/AppIcon.appiconset/AppIcon29x29@2x-1.png b/Juick/Images.xcassets/AppIcon.appiconset/AppIcon29x29@2x-1.png Binary files differnew file mode 100644 index 0000000..1f51f3e --- /dev/null +++ b/Juick/Images.xcassets/AppIcon.appiconset/AppIcon29x29@2x-1.png diff --git a/Juick/Images.xcassets/AppIcon.appiconset/AppIcon29x29@2x.png b/Juick/Images.xcassets/AppIcon.appiconset/AppIcon29x29@2x.png Binary files differnew file mode 100644 index 0000000..1f51f3e --- /dev/null +++ b/Juick/Images.xcassets/AppIcon.appiconset/AppIcon29x29@2x.png diff --git a/Juick/Images.xcassets/AppIcon.appiconset/AppIcon40x40.png b/Juick/Images.xcassets/AppIcon.appiconset/AppIcon40x40.png Binary files differnew file mode 100644 index 0000000..0af7db9 --- /dev/null +++ b/Juick/Images.xcassets/AppIcon.appiconset/AppIcon40x40.png diff --git a/Juick/Images.xcassets/AppIcon.appiconset/AppIcon40x40@2x-1.png b/Juick/Images.xcassets/AppIcon.appiconset/AppIcon40x40@2x-1.png Binary files differnew file mode 100644 index 0000000..f08b9dc --- /dev/null +++ b/Juick/Images.xcassets/AppIcon.appiconset/AppIcon40x40@2x-1.png diff --git a/Juick/Images.xcassets/AppIcon.appiconset/AppIcon40x40@2x.png b/Juick/Images.xcassets/AppIcon.appiconset/AppIcon40x40@2x.png Binary files differnew file mode 100644 index 0000000..f08b9dc --- /dev/null +++ b/Juick/Images.xcassets/AppIcon.appiconset/AppIcon40x40@2x.png diff --git a/Juick/Images.xcassets/AppIcon.appiconset/AppIcon60x60@2x.png b/Juick/Images.xcassets/AppIcon.appiconset/AppIcon60x60@2x.png Binary files differnew file mode 100644 index 0000000..55ec21c --- /dev/null +++ b/Juick/Images.xcassets/AppIcon.appiconset/AppIcon60x60@2x.png diff --git a/Juick/Images.xcassets/AppIcon.appiconset/AppIcon76x76.png b/Juick/Images.xcassets/AppIcon.appiconset/AppIcon76x76.png Binary files differnew file mode 100644 index 0000000..9bcf101 --- /dev/null +++ b/Juick/Images.xcassets/AppIcon.appiconset/AppIcon76x76.png diff --git a/Juick/Images.xcassets/AppIcon.appiconset/AppIcon76x76@2x.png b/Juick/Images.xcassets/AppIcon.appiconset/AppIcon76x76@2x.png Binary files differnew file mode 100644 index 0000000..e06b21e --- /dev/null +++ b/Juick/Images.xcassets/AppIcon.appiconset/AppIcon76x76@2x.png diff --git a/Juick/Images.xcassets/AppIcon.appiconset/Contents.json b/Juick/Images.xcassets/AppIcon.appiconset/Contents.json index a396706..985f259 100644 --- a/Juick/Images.xcassets/AppIcon.appiconset/Contents.json +++ b/Juick/Images.xcassets/AppIcon.appiconset/Contents.json @@ -1,18 +1,93 @@ { "images" : [ { + "size" : "29x29", "idiom" : "iphone", + "filename" : "AppIcon29x29.png", + "scale" : "1x" + }, + { "size" : "29x29", + "idiom" : "iphone", + "filename" : "AppIcon29x29@2x.png", "scale" : "2x" }, { - "idiom" : "iphone", "size" : "40x40", + "idiom" : "iphone", + "filename" : "AppIcon40x40@2x-1.png", "scale" : "2x" }, { "idiom" : "iphone", + "size" : "57x57", + "scale" : "1x" + }, + { + "idiom" : "iphone", + "size" : "57x57", + "scale" : "2x" + }, + { "size" : "60x60", + "idiom" : "iphone", + "filename" : "AppIcon60x60@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "AppIcon29x29-1.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "AppIcon29x29@2x-1.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "AppIcon40x40.png", + "scale" : "1x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "AppIcon40x40@2x.png", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "50x50", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "50x50", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "72x72", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "72x72", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "AppIcon76x76.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "AppIcon76x76@2x.png", "scale" : "2x" } ], diff --git a/Juick/MessagesViewController.h b/Juick/MessagesViewController.h index ceff611..a5081de 100644 --- a/Juick/MessagesViewController.h +++ b/Juick/MessagesViewController.h @@ -8,7 +8,7 @@ #import <UIKit/UIKit.h> -@interface MessagesViewController : UITableViewController +@interface MessagesViewController : UITableViewController<UISplitViewControllerDelegate> - (id)initWithURL:(NSURL *)messagesURL; - (void) refreshData:(UIRefreshControl *)refresh; @end diff --git a/Juick/MessagesViewController.m b/Juick/MessagesViewController.m index 1fb4ece..2f5cc29 100644 --- a/Juick/MessagesViewController.m +++ b/Juick/MessagesViewController.m @@ -95,12 +95,13 @@ static NSString *CellIdentifier = @"MessageCell"; self.dataLoading = NO; self.title = @"Discover"; [self.view setBackgroundColor:[ColorsAndButtons mainBackground]]; - SWRevealViewController *revealController = [self revealViewController]; - [self.navigationController.navigationBar addGestureRecognizer:revealController.panGestureRecognizer]; - UIBarButtonItem *revealButtonItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"reveal-icon.png"] + if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) { + SWRevealViewController *revealController = [self revealViewController]; + [self.navigationController.navigationBar addGestureRecognizer:revealController.panGestureRecognizer]; + UIBarButtonItem *revealButtonItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"reveal-icon.png"] style:UIBarButtonItemStyleBordered target:revealController action:@selector(revealToggle:)]; - - self.navigationItem.leftBarButtonItem = revealButtonItem; + self.navigationItem.leftBarButtonItem = revealButtonItem; + } self.messages = [NSMutableArray array]; UIRefreshControl *refresh = [[UIRefreshControl alloc] init]; [refresh addTarget:self action:@selector(refreshData:) forControlEvents:UIControlEventValueChanged]; @@ -198,5 +199,13 @@ static NSString *CellIdentifier = @"MessageCell"; return 100.0f; } +-(void)splitViewController:(UISplitViewController *)svc willShowViewController:(UIViewController *)aViewController invalidatingBarButtonItem:(UIBarButtonItem *)barButtonItem { + self.navigationItem.leftBarButtonItem = nil; +} + +-(void)splitViewController:(UISplitViewController *)svc willHideViewController:(UIViewController *)aViewController withBarButtonItem:(UIBarButtonItem *)barButtonItem forPopoverController:(UIPopoverController *)pc { + self.navigationItem.leftBarButtonItem = barButtonItem; +} + @end |