I want to display interface UITabBar
when login succeeds.
I declare interface UITabBar
in AppDelegate
, but after login success I don't know how to call the interface.
Here is my code:
appdelegate.m
-(void)loadInterface
{
[self configureiPhoneTabBar];
}
-(void)configureiPhoneTabBar
{
UITabBarController *tabBarController = (UITabBarController *)self.window.rootViewController;
UIViewController *controller1 = [[tabBarController viewControllers] objectAtIndex:0];
[self configureTabBarItemWithImageName:@"home_ON.png" : @"home.png" andText:@"Trang chủ" forViewController:controller1];
UIViewController *controller2 = [[tabBarController viewControllers] objectAtIndex:1];
[self configureTabBarItemWithImageName:@"channel_ON.png" : @"tvChannel.png" andText:@"Kênh" forViewController:controller2];
}
and loginviewcontroller.m
- (IBAction)btnLogin:(id)sender {
[self performSegueWithIdentifier:@"idenLogin" sender:self];
AppDelegate *delegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
[delegate loadInterface];
}
Secondly, when you touch on button "play", layout video shows and it works ok, but I want to auto rotate
note: This is interface on iphone and I fix Portrait in Summary, I'm still show landscape, How to do?
Can u download my code demo is here