Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2014
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
  2. {
  3. UIStoryboard *storyBord;
  4. if(UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)
  5. {
  6. if(self.window.frame.size.height == 568)
  7. storyBord = [UIStoryboard storyboardWithName:@"Main_iPhone5" bundle:[NSBundle mainBundle]];
  8. else
  9. storyBord = [UIStoryboard storyboardWithName:@"Main_iPhone4" bundle:[NSBundle mainBundle]];
  10. }
  11. self.window.rootViewController = [storyBord instantiateInitialViewController];
  12. [self.window makeKeyAndVisible];
  13.  
  14. return YES;
  15. }
  16.  
  17. - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
  18. {
  19. self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
  20. if (self)
  21. {
  22. if(UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)
  23. {
  24. if([UIScreen mainScreen].bounds.size.height == 568)
  25. self = [super initWithNibName:@"FeedActivity_iPhone5" bundle:[NSBundle mainBundle]];
  26. else
  27. self = [super initWithNibName:@"FeedActivity_iPhone4" bundle:[NSBundle mainBundle]];
  28. }
  29. }
  30. return self;
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement