uitabbarcontroller

has uitabbarcontroller changed in xcode 4

拜拜、爱过 提交于 2019-12-12 17:13:31
问题 I recently upgraded to xcode 4. My application utilizes tabbarcontroller. In old xcode 3.x, you were able to change the tabs to different types per this screenshot: From what I gather in researching this issue, xcode 4 no longer offers this functionality. Am I missing something? From what I researched we are now suppose to delete/add tabs then change attributes to get the desired effect. So, to that end in xcode 4, I've added a new tab item and made the class a UINavigationController fully

How to present a viewController modally when it's tabBar item is selected

怎甘沉沦 提交于 2019-12-12 14:32:03
问题 I have an app with a UITabBarController and 5 UITabBarItem s. I would like to launch modally a View Controller for the third tab-bar item (camera controller). I tried this code: override func viewDidLoad() { super.viewDidLoad() self.presentViewController(self, animated: true, completion: nil) } But my app crashed. What should I do? 回答1: If you want a floating center button (or something similar) you basically need an empty tab that is used as a placeholder for a custom button that you add at

Hide Tabbar in Landscape without pushing to NavigationController

余生长醉 提交于 2019-12-12 14:13:49
问题 I want to show another view without Tabbar in Landscape. So I create a new view and only change the self.view and self.hidesBottomBarWhenPushed = YES; But it doesn´t work for me. Hope someone can help? 回答1: just add this line in your viewWillAppear: method of your view for hide UITabBar [self.tabBarController.tabBar setHidden:YES]; and for set new view as a RootViewController just use below code... YourNewViewController *objView = [[YourNewViewController alloc] initWithNibName:@

tableView didSelectRowAtIndexPath doesn't work properly on iOS 7. Why?

寵の児 提交于 2019-12-12 13:17:43
问题 In first place I would like to say that I'm only making this question, because I would like to understand what is happening. I opened an old Xcode project (a very simple one) in a fresh installation on Xcode5. When I realize that it doesn't work on iOS 7. Why? Don't know.. I saw some other questions, didn't get any useful answer, so I made a simple test. In the UITableViewController all works fine except on didSelectRowAtIndexPath Check it out RootViewController.h: @interface

iPhone UITabBarController

梦想的初衷 提交于 2019-12-12 12:28:52
问题 I am using a UITabBarController with 3 items and am curious how to access a method from the first tab if I am on the second or third tab. The problem I am running into is I have a UIImageView on the first tab that is using core animation to loop continuously through 3 images. But when I switch to the second tab and try to switch back to the first tab the program hangs. I discovered if I stop the animation then it will let me switch back to the first tab fine. Any ideas? 回答1: You can access

Best practice to support portrait and landscape views in a UINavigationController

余生颓废 提交于 2019-12-12 11:01:12
问题 I searched high and low and I'm not sure what I came out with is the best way of dealing with this (though it seems the only one). According to Want to use muliple nibs for different iphone interface orientations I implemented the relevant methods, and everything seems to work fine. Unfortunately I have to deal with a UINavigationController, and each page has to support both portrait and landscape modes, and reproduce the same functionalities in both modes. That means that If a user at some

UITabBarController + autorotation

倾然丶 夕夏残阳落幕 提交于 2019-12-12 10:27:33
问题 I created an application with a TabBarController using IB who have 4 TabBarItems and so display 4 differents ViewControllers. To allow a landscape orientation I must add this code in all of my ViewController: - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return (interfaceOrientation == UIInterfaceOrientationPortraitUpsideDown ? NO : YES); } The problem is I don't want for example the secondViewController to autorotate, How can I do that? Because

Adding UITabBarController and have no NavigationController

那年仲夏 提交于 2019-12-12 10:10:04
问题 As I'm new in Xamarin.IOS, I'd like to ask a question. I've followed this example for adding UITabBarController in a Xamarin.IOS project. When I initialized RootViewController by an instance of TabController, it works fine and I have all tabs. BUT my NavigationController set null ! it means that : NavigationItem will disappear navigating between viewControllers are not possible by this code : this.NavigationController.PushViewController(new ProfileViewController(), true); because the

Autorotation, UIWebView and UITabBarController

China☆狼群 提交于 2019-12-12 10:08:06
问题 I have the following View hierarchy: UITabBarController | UINavigationController | | | UIViewController (only supports Portrait rotation) | UINavigationController | | | UIViewController (only supports Portrait rotation) | UINavigationController | | | UIViewController (only supports Portrait rotation) | | | UIViewController (has UIWebView with movie in it) | UINavigationController | UIViewController (only supports Portrait rotation) The issue is now that when I display the UIWebView with the

Swift - Could not cast value of type 'UITabBarController'

主宰稳场 提交于 2019-12-12 10:05:10
问题 I have a login screen that takes credentials, and based on outcome of verification, user is redirected to another view controller or not. The login view controller is controlled by NavigationController and once the login is successful, user is redirected to a Home view controller controlled by UITabBarController . When I trigger the segue, it says the following error: Could not cast value of type 'UITabBarController' (0x10d414030) to 'Mawq.HomeViewController' (0x10a7ed220). Here is the code