uitabbarcontroller

Why don't my TabBar buttons autoresize on the iPad?

ぐ巨炮叔叔 提交于 2019-12-06 10:06:26
问题 I'm building a universal iOS app and the iPad version uses a SplitViewController. In the popover view, I have a UITabBarController with two buttons. When it runs on the iPhone, the TabBar buttons correctly stretch to fill the entire width of the view... ...but on the iPad, in the popover view, the buttons don't stretch to fill the entire width... I'm creating the UITabBarController programmatically... InspectionTabBarViewController *inspectionTabBarVC; InspectionListViewController

Issues with UIMoreNavigationController and UITabBarController

感情迁移 提交于 2019-12-06 09:56:00
This problem has been plaguing me for a little while, but I've think I've finally figured out what's wrong; I think I just need a solution now... Here's the background on the app. There are about 6 different tabs which the user can use, displayed using a UITabBarController. Each of these tabs is a custom UIViewController subclass, inside a UINavigationController. All 6 tabs are set up inside a nib file (MainWindows.xib). I need to be able to hide and show different tabs depending on if the user is logged on or not, and who they're logged into. I have this working like so: On app launch

UIViewController and UISplitViewController in UITabBarController shouldAutorotateToInterfaceOrientation

喜你入骨 提交于 2019-12-06 08:57:56
问题 i have some Problems with my iPad Code. I have a UITabBarController which holds some UIViewController and a UISplitViewController. The problem is that the UIViewController and even the UISplitViewController dont recognize orientation Changes correctly. i have set shouldAutorotateToInterfaceOrientation on my TabBarController and all UIViewControllers but i realized that only willRotateToInterfaceOrientation in the Top moast ViewController will fire which is my TabBarController. If i remove

Presenting UITabBarController Modally - Autorotate Problem

流过昼夜 提交于 2019-12-06 08:09:42
问题 I'm attempting to present a UITabBarController modally using the following code: // Declare all view controllers. TabOne *tabOne = [[TabOne alloc] initWithNibName:@"TabOne" bundle:nil]; TabTwo *tabTwo = [[TabTwo alloc] init]; TabThree *tabThree = [[TabThree alloc] init]; // Set each view controller's delegate to self. tabOne.delegate = self; tabTwo.delegate = self; tabThree.delegate = self; // Set a title for each view controller. tabOne.title = @"One"; tabTwo.title = @"Two"; tabThree.title =

sharing NSManagedObjectContext and other service classes between iphone/ipad tabs

放肆的年华 提交于 2019-12-06 07:57:51
I am well into building a Core Data tab-based iPad application. I am passing in my NSManagedObjectContext to my root view using the following in my app delegate class. - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.rootViewController.managedObjectContext = self.managedObjectContext; [window addSubview:tabBarController.view]; [window makeKeyAndVisible]; return YES; } My question is: how do I set the same managedObjectContext on all my tabs? It would also be good if I could set up some of my service classes in the app delegate

UITabbarController selectedIndex and selectedViewController do not work

廉价感情. 提交于 2019-12-06 07:11:16
I've tried to put following two lines into - (void)viewDidLoad. self.tabBarController.selectedIndex = 3; self.tabBarController.selectedViewController = [self.tabBarController.viewControllers objectAtIndex:3]; At that time, only Tabbar index to change 3 but View Controller remained at default view controller, mean 0. Is there any thing missing in my coding? Solution: Try by moving your, self.tabBarController.selectedIndex = 3; self.tabBarController.selectedViewController = [self.tabBarController.viewControllers objectAtIndex:3]; portion of your code to UIVIewController's - (void)viewDidAppear:

How to obtain child view controllers of UIMoreListController (a private framework class)?

不羁岁月 提交于 2019-12-06 06:49:48
问题 I'm curious if there is a legitimate API with which to obtain the view controllers that are children of a UIMoreListController ? (The UIMoreListController is the child at the top of the UIMoreNavigationController's view stack. The UIMoreNavigationController is the object pointed to by the moreNavigationController property of a UITabBarController .) In other words, if I have a UITabBarController and I set an array of six view controllers on it, the view hierarchy will actually look like this

UISegmentedcontrol to switch views in UITabbarcontroller

ぐ巨炮叔叔 提交于 2019-12-06 05:34:53
I am trying to switch between multiple different views using a UISegmentedControl . I found a really good example to do this in: http://redartisan.com/2010/6/27/uisegmented-control-view-switching-revisited However, I need to use a UITabbarController in my app. So the navigation controller is not available for me in the app delegate. Is there any other way to switch views in a UITabbarController using UISegmentedControl ? First, consider whether you really want to do this. UITabBarController already gives you the ability to switch views, using the tab bar. If you really want to do this for some

self.tabBarController is NULL

女生的网名这么多〃 提交于 2019-12-06 03:37:37
I created a UITabBarController like the following and pushed a navigationController, but I now cannot set the title of tab bar items etc... as the tabbarcontroller is NULL. Please can you tell me where I am going wrong. UITabBarController *tabBarController = [[UITabBarController alloc] init]; LoggedInFeedNavigationController *lvc = [[LoggedInFeedNavigationController alloc] initWithAccount:account]; [tabBarController setViewControllers:[NSArray arrayWithObject:lvc]]; [tabBarController setSelectedIndex:0]; [self presentModalViewController:tabBarController animated:YES]; [tabBarController release

How to connect two different Tab bar icons to same view controller with storyboard?

。_饼干妹妹 提交于 2019-12-06 02:59:37
I have a tab bar controller in an iPad app with 6 items. Two of the icons will when you tap at them lead to the same view controller. This view controller has a list of items it will show, it will change slightly depending on which of the tab bar icons you tapped. How do i set this up with storyboards? Its possible to drag the relationship twice to the same view controller, but then it just shows two of the same icons on the tab bar. I want the two choices to have different icons and name. Like you've found, you can design the view controller once in the storyboard but won't be able to