Advertisement
Guest User

Untitled

a guest
May 4th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.20 KB | None | 0 0
  1. SNLoginViewController *loginVC = [[SNLoginViewController alloc] init];
  2. SNLoginNavController *loginNavVC = [[SNLoginNavController alloc] initWithRootViewController:loginVC];
  3. [self presentViewController:loginNavVC animated:YES completion:nil];
  4.  
  5. - (instancetype)initWithRootViewController:(UIViewController *)rootViewController {
  6. self = [super initWithRootViewController:rootViewController];
  7. if (self) {
  8.  
  9. UIImage *bgImage = [UIImage imageNamed:@"bg"];
  10. UIImageView *bgImageView = [[UIImageView alloc] initWithImage:bgImage];
  11. bgImageView.frame = [UIScreen mainScreen].bounds;
  12. [self.view insertSubview:bgImageView atIndex:0];
  13.  
  14. [self.navigationBar setBackgroundImage:[UIImage imageNamed:@"transparent"]//transparent is a transparent png
  15. forBarMetrics:UIBarMetricsCompact];
  16. self.navigationBar.shadowImage = [UIImage imageNamed:@"transparent"];
  17. self.navigationBar.barStyle = UIBarStyleBlackTranslucent;
  18.  
  19. [self.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor whiteColor], NSFontAttributeName: [UIFont systemFontOfSize:18]}];
  20. self.navigationBar.clipsToBounds = YES;
  21. }
  22. return self;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement