iOS-uitabbarcontroller之前的登录视图
我想在登录成功时显示界面iOS-uitabbarcontroller之前的登录视图,ios,uitabbar,mpmovieplayer,Ios,Uitabbar,Mpmovieplayer,我想在登录成功时显示界面uitabar。 我在AppDelegate中声明了接口uitabar,但登录成功后,我不知道如何调用接口 这是我的密码: appdelegate.m -(void)loadInterface { [self configureiPhoneTabBar]; } -(void)configureiPhoneTabBar { UITabBarController *tabBarController = (UITabBarCon
uitabar
。
我在AppDelegate
中声明了接口uitabar
,但登录成功后,我不知道如何调用接口
这是我的密码:
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];
}
和loginviewcontroller.m
- (IBAction)btnLogin:(id)sender {
[self performSegueWithIdentifier:@"idenLogin" sender:self];
AppDelegate *delegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
[delegate loadInterface];
}
第二,当你们点击“播放”按钮时,布局视频显示,它工作正常,但我想自动旋转
注:这是iphone上的界面和我修复的人像总结,我还在展示风景,怎么办
你能下载几句话吗?你需要登录屏幕的模态视图 下面是我是如何做到这一点的(从应用程序代理类)。请注意,我在storytboard中设计了登录视图
- (void) showLoginView
{
assert(loginController == nil);
assert(activityView == nil);
UITabBarController *tabbar = (UITabBarController *)self.window.rootViewController;
loginController = [tabbar.storyboard instantiateViewControllerWithIdentifier:@"LoginViewController"];
loginController.delegate = self;
[tabbar presentModalViewController:loginController animated:YES];
}
我在AppDelegate中创建了一个名为WindowsState或类似的对象,用于管理窗口的rootViewController。最初是登录或启动,然后您可以在WindowsState类中运行检查并侦听通知,例如MyAppDidSignInNotification,然后将应用程序的rootViewController更改为UITabBarController或其他任何类型
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.windowState = [[FASWindowState alloc] initWithWindow:self.window];
[self.window makeKeyAndVisible];
return YES;
}
我会先把iso改成ios:)对不起,但是。。。如果我代替你这样做是不对的:)任何帮助是的-但是编辑你的代码-诺赖特,我知道,但我不理解你的代码->[[FasWindowsState alloc]initWithWindow:self.window];