uitabbarcontroller

How to share data between view controllers managed by tab bar

假如想象 提交于 2019-12-11 10:30:15
问题 I have three views managed by tab bar controller and I would like to have shared data between the three (I have a separate login screen that passes data to the first view but my second view needs to utilize some of that data). What is the best way to share data between the different views? 回答1: Your question is too general. There are many ways to solve this problem and how you do it depends on what you are trying to achieve. For example, you might create an object to hold this data and set it

Full screen in one tab of UITabBarController

别来无恙 提交于 2019-12-11 10:19:48
问题 Currently, five UIViewControllers are switched via a UITabBarController. How can I hide the TabBar and provide a full-screen for one of the UIViewControllers? For example: The middle tab is clicked The UITabBarController TabBar is hidden The UIViewController takes full screen (hides status bar also) When one button in the middle is clicked, switch to the first tab (status bar resumes, UITabBarController TabBar resumes) 回答1: You can put the view controller in a navigation controller and set

UITabBarController Set a Default Tab in Swift Language

别说谁变了你拦得住时间么 提交于 2019-12-11 09:47:17
问题 I have a UITabBarController that has 5 different view controllers attached to it. Each one has there own specific tab such as Home, Settings, etc. How can i set a certain tab to be the default tab when launched? 回答1: Is there a specific reason why you can't move your chosen first tab to be presented to the left most slot? self.tabBarController.selectedIndex = desiredIndex or, if you're code is in a UITabBarConroller subclass, simply: selectedIndex = desiredIndex should work. 回答2: You could

Tab bar Controller and Facebook Connect Issues Xcode 4.3 IOS 5.1

核能气质少年 提交于 2019-12-11 09:38:03
问题 I am trying to connect to the facebook and take the users name and picture, so far i can connect and fetch user name . i have a working code can be downloaded from here (single view application) But if i put a tab bar controller to the code, it can not receive a response from facebook. I add a tabbar controller programatically like below code in app.m - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Regular Code /*self

call popToRootViewController from another tab

半城伤御伤魂 提交于 2019-12-11 09:25:37
问题 I have tab bar with navigation controller app using storyboard , my purpose is to press a button in tab3 and in the background I want tab1 to "popToRootViewController" the button in tab3 viewcontroller: - (IBAction)Action:(id)sender { vc1 * first = [[vc1 alloc]init]; [first performSelector:@selector(popToRootViewController) withObject:Nil]; } the code in the tab1 viewcontroller -(void)popToRootViewController{ [self.navigationController popToRootViewControllerAnimated:NO]; NSLog(@

Changing the navigationbar color on the Edit screen of the More section

风格不统一 提交于 2019-12-11 08:48:17
问题 I am able to change the navbar color of the More navigationcontroller via: stTabBarController.moreNavigationController.navigationBar.tintColor = [UIColor colorWithRed:(102.0/255.0) green:(20.0/255.0) blue:(11.0/255.0) alpha:1]; but when I click the Edit button, the Configure screen appears and the navbar color is the default blue. How can I change this color? 回答1: Solved it: #pragma mark UITabBarControllerDelegate - (void)tabBarController:(UITabBarController *)controller

UITabBarController Without a UITabBar

南楼画角 提交于 2019-12-11 07:47:14
问题 I'v been trying to hide/remove the UITabBar from a UITabBarController. I've got a UITabBar in my iPhone version but I've moved the navigation to a new view controller for the iPad version. The new menu works using the UITabBarDelegate methods to switch between the UIViewControllers. So far so good. All I need now is to somehow hide the UITabBar. I've got a custom UITabBarController and I've tried simply using self.tabBar.hidden = YES; but i need the view to fill the screen. Thank you 回答1: So

UITabbarController showing only first tab

烂漫一生 提交于 2019-12-11 07:36:36
问题 I manually added UITabbarController in storyboard which is not root view controller. I added tabbar items to it and set segue relationships. I also set image and title of each tabbar item in code when the first view controller of UITabbarController is about to be presented but no matter what I do only the first item's image is visible. Other items images become visible only when they are tapped and their views are actually loaded. Any inputs how to fix it ? - (void)prepareForSegue:

popToRootViewController with animation and then switch tab

孤人 提交于 2019-12-11 07:34:05
问题 I have a UITabBarController with 4 views/tabs. Each view is a UINavigationController. How can I popToRootViewController on one of these UINavigationControllers then switch tabs and push a viewController onto another UINavigationController using animation throughout? So the sequence would be: At start we are in Tab 1's view which is a UINavigationController. A View has been pushed onto it beyond its root ViewController. -Tab 1 - UINavigationController1 - RootViewController1 -

How to create PageView with UITabBar or Segment Control using Swift?

*爱你&永不变心* 提交于 2019-12-11 07:28:28
问题 I am quite new in iOS. I have a problem and not able to get the exact idea for implementation. I am uploading two images here, so please suggest me how can I implement it using Swift. Here is my images: In Images you can see that for a single viewController there is two tabs one is "YOUR GROUP" and another one is "SHARED BY". In that I have a tableView also. I have created two custom UITableViewCells one for "YOUR GROUP" and another one for "SHARED BY". Actually basic idea I know that using