Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SNLoginViewController *loginVC = [[SNLoginViewController alloc] init];
- SNLoginNavController *loginNavVC = [[SNLoginNavController alloc] initWithRootViewController:loginVC];
- [self presentViewController:loginNavVC animated:YES completion:nil];
- - (instancetype)initWithRootViewController:(UIViewController *)rootViewController {
- self = [super initWithRootViewController:rootViewController];
- if (self) {
- UIImage *bgImage = [UIImage imageNamed:@"bg"];
- UIImageView *bgImageView = [[UIImageView alloc] initWithImage:bgImage];
- bgImageView.frame = [UIScreen mainScreen].bounds;
- [self.view insertSubview:bgImageView atIndex:0];
- [self.navigationBar setBackgroundImage:[UIImage imageNamed:@"transparent"]//transparent is a transparent png
- forBarMetrics:UIBarMetricsCompact];
- self.navigationBar.shadowImage = [UIImage imageNamed:@"transparent"];
- self.navigationBar.barStyle = UIBarStyleBlackTranslucent;
- [self.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor whiteColor], NSFontAttributeName: [UIFont systemFontOfSize:18]}];
- self.navigationBar.clipsToBounds = YES;
- }
- return self;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement