uitabbarcontroller

UITabBarViewController Navigation Item in displays in Status Bar area on Launch

独自空忆成欢 提交于 2019-12-24 19:05:40
问题 When launching a UITabBarViewController from code in a storyboard the first view displays the navigation controller too high in the status area. Tapping the tabs corrects it, however the first view is incorrect. Do I need something else in the AppDelegate? Specific code solutions would be appreciated. Thanks - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Need something here??? return YES; } // initial UITabBarViewController in

I have a tab bar that I am trying to detect if it was touched inside view controller 2

允我心安 提交于 2019-12-24 17:46:27
问题 Basically I have a tab bar in view controller one. I am trying to detect if this tabaritem is touched inside view controller 2. What is the best method to perform such a task? I can post more specific code if you would like. view controller 1 TUHomeViewController *homeViewController = [[TUHomeViewController alloc] initWithNibName:nil bundle:nil]; UINavigationController *homeNavigationController = [[UINavigationController alloc] initWithRootViewController:homeViewController];

Get title of selected tab in UITabBarController

ⅰ亾dé卋堺 提交于 2019-12-24 17:17:14
问题 I have set the title for all five of my tabs in my AppDelegate file. I would like to access that title in another view within my application. I have the code below to output to the log window the selected index of that selected tab but what I'd really like to get is the title for that tab. I did have a look through the UITabBarController Class Reference and I didn't see anything that would allow me to do this. What I am trying to avoid is some sort of switch or if...else statement where I

unable to stop device rotation

泪湿孤枕 提交于 2019-12-24 15:18:27
问题 I have posted a question here . In which one buddy replied and gave solution. Although the solution is working on few view controllers but on view its not working. When I enter a view controller that has TabController + navigation controller on there tab Bar Items, the code doesn't work. and the views are able to rotate. I used the Following code for iOS 6.1 //For iOS6 - (BOOL)shouldAutorotate { return NO; } - (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation { return

Could not load NIB in bundle using storyboard

邮差的信 提交于 2019-12-24 14:54:13
问题 With the last version of iOs 8.3, I get this error when I run one of my app: Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle The app has 2 storyboards, one for iPhone (working normally) and the other for iPad (crashing). I've tried the suggestions of this topic with no results: Xcode 6.3: Could not load NIB in bundle In my case I'm using StoryBoards and I've no flag on "Use size classes". Until iOs 8.2 the app

iOS - go to second uiviewcontroller of some tab from another tab

旧巷老猫 提交于 2019-12-24 14:39:12
问题 I'm developing an iOS 5 app using Storyboard. I have UITabBarController which has 3 tabs. Every tab has its own UINavigationController . UINavigationController of first tab has one UITableViewController which segues to another UIViewController etc. UINavigationController of second tab has only one UIViewController . What I want to achieve is to navigate to UIViewController (second view in UINavigationController of first tab) when certain action happens in UIViewController of second tab. I've

UITabBar with UINavigationController in code

耗尽温柔 提交于 2019-12-24 14:30:45
问题 I've currently got a UITabBar with 5 screens calling UIViews. That part works fine but I want to put in a UINavigationController in a couple of them. I have found a few tutorials that work fine but all of them implement it in IB and I want to avoid that if possible. I'm lost as to where to implement the UINavigationController, should I do it in the App Delegate with the UITabBar and call the navigation controller from the UIView or should I create it in the UIView class? I've tried about 8

UITabBarController subviews disappear when hidesBottomBarWhenPushed is set to YES only on iOS7

前提是你 提交于 2019-12-24 14:05:33
问题 I made a subclass of UITabBarController that adds a custom UIView on top of tabs to replace the default badging on a UITabBarItem. I add these custom badgeviews on viewDidLoad of my custom UITabBarController. [self.view addSubview:_tabBarItem1BadgeView]; The drawRect on my custom tabBarBadgeView looks like this: - (void)drawRect:(CGRect)rect{ CGContextRef ctx = UIGraphicsGetCurrentContext(); // Badge CGSize size = self.frame.size; CGSize badgeSize = [self sizeThatFits:size]; badgeSize.height

Tabbar is not showing in extended views in XCode

为君一笑 提交于 2019-12-24 13:47:21
问题 ! am an objective c beginner. I have researched hours on this issue and have watched youtube videos but still cant solve this problem - I have created tabbar controller with first view as the first tab as dispalyed in the pic. I then tried to extend the first view with two more views: one master table view and one detail UIView. The first view is linked to the master table view through the button on the first view. I compiled to run the project, everything is smooth except the tabbar is not

How to pass value from navigationController to TabBarController

大兔子大兔子 提交于 2019-12-24 12:51:28
问题 I have a Login project. The first view controller is NavController and I need to pass user data to tabBarController where I have 3 NavigationControllers. I tried this. let openNewVC = self.storyboard?.instantiateViewControllerWithIdentifier("mainNavID") as! UITabBarController //openNewVC.token = token! self.navigationController?.pushViewController(openNewVC, animated: true) 回答1: You can pass the data from your first view Controller to view controllers which are embedded like as below in