uitabbarcontroller

UITabBarController - how to make “no tabs” selected at start up?

风流意气都作罢 提交于 2019-12-22 09:59:54
问题 Is there any way in iPhone to unselect all tabs of a UITabBarController ? ie, my application has a "homepage" which does not belong to any tabs on the below displayed tabbar. Now when user touches any tab on the tabbar, I would like to load the corresponding tab. Is this possible ? I have already tried: self.tabBarController.tabBarItem.enabled = NO; self.tabBarController.selectedIndex = -1; but this does not help. Any other solutions ? Please ? 回答1: I've managed to accomplish this using KVO

Swift UITabBarController hide with animation

蓝咒 提交于 2019-12-22 08:06:13
问题 I'm trying to add animation to my tabBarController when hidden. Im able to accomplish this effect with the navigationBarController by using self.navigationController?.isNavigationBarHidden = true . I'm able to hide the tabBar by using self.tabBarController?.tabBar.isHidden = true but i do not get the animation how can I do this thank you in advance. 回答1: You could change the tab bar's frame inside an animation, so something like: func hideTabBar() { var frame = self.tabBarController?.tabBar

why does selecting a tabbarController index programatically doesnt call delegate method

回眸只為那壹抹淺笑 提交于 2019-12-22 06:36:01
问题 when we touch the tabbaritem of the tabbarcontroller the delegate methods are called: -(BOOL)tabBarController:(UITabBarController *)tabBarController shouldSelectViewController:(UIViewController *)viewController; - (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController; but when try to do the same thing programmatically, i.e. [self.tabbarController setSelectedIndex:selectedIndexNo]; or [self.tabBarController

Double Clicking on UITabBarControllers Tab goes to root of Navigation controller

守給你的承諾、 提交于 2019-12-22 05:42:13
问题 I have a UITabBarController setup with 2 UINavigationControllers. One UINavigationController has One UIViewController, the other UINavigationController has Two UIViewControllers. If you then navigate to the second UIViewController and click the Tab that is already selected it bring you to the root of the UINavigationController (This would be the first UIViewController). Is there a way to stop this from happening? I do not want the user to be able to click an already selected Tab to go to the

Set UITabBarItem title programmatically?

拈花ヽ惹草 提交于 2019-12-22 05:23:17
问题 My app is based on a tab bar architecture. In order to have an easy internationalisation mechanic, I do not write any string in XIB files. viewdidload permits to change programmaticaly the strings in the views. When my app launches, I can see the 4 tabs. But in fact only the first one loads its view controller. The others wait for user click to be loaded. Tabs title can be changed using [self setTitle:@"Mouhahaha"]; in viewDidLoad of loaded view controller. If I want to keep my

Hide UINavBar and UITabBar at the same time with animation

徘徊边缘 提交于 2019-12-22 04:04:15
问题 Edit : I awarded the bounty to john since he put a lot of effort into his answer, and would get it anyways, but there's still no working solution. I am still looking for an answer, if someone knows how to do this it'd be greatly appreciated. I want to add a "maximize" button to my app that hides the navigation and tab bar. The navbar and tabbar should slide in/out smoothly, and the inner/content view should also expand and shrink at the same rate as the navbar and tabbar. I used [self

UITabBarItems in UITabBar show after I click the item not when application launches

陌路散爱 提交于 2019-12-22 03:22:51
问题 This application I'm writing has a problem. I'm setting up the UITabBar in my application window and set the icons in the view files. But when i run the app, the first icons show up (because the view is loaded I guess) and the other icons do not show up until I click them. Do i need to implement self.tabBarItem in some other method not viewDidLoad ? Thanks in advance to everyone! - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

Swift 2: How to Load UITabBarController after Showing LoginViewController

霸气de小男生 提交于 2019-12-21 21:46:30
问题 Am new to Swift and Storyboard. At initially I have to show the login page and from the login page to UITabBarController. Once the user remembered the login details I have to check the login details in the AppDelegate and show the UITabBarController directly if the user already logged in. I have referred some SOF questions but, am not getting the result. I designed the LoginViewController embedded with UINavigationController. And I have one UITabBarController with 2 viewcontrollers. I set the

How to get a fully transparent TabBar in UITabBarController [duplicate]

余生颓废 提交于 2019-12-21 21:25:18
问题 This question already has an answer here : UITabBar fully transparent (1 answer) Closed 6 years ago . I have spent the last few hours trying to get the TabBar in a UITabBarController fully transparent (clear background). I use a custom subclass of the UITabBarController and I managed to change the tintColor, the alpha, but the background color definitely remains the one defined in IB. Thanks for your help, I'm getting crazy... 回答1: Here is one way to accomplish that. CGRect frame = CGRectMake

How to increase the size of UITabbar

 ̄綄美尐妖づ 提交于 2019-12-21 20:56:45
问题 I have to increase the height of UITabbar. How can I do this any help please? 回答1: You change its height, width, x and y coordinates. See this: CGRect viewFrame=self.tabBar.frame; //change these parameters according to you. viewFrame.origin.y -=50; viewFrame.origin.x -=20; viewFrame.size.height=200; viewFrame.size.width=300; self.tabBar.frame=viewFrame; You can change these parameters for tabBar not tabBar controller in case of tabBased app selected in starting when you select the app type.