uitabbarcontroller

UITabbarController with MoreNavigationController , PoptoRootViewController issue

跟風遠走 提交于 2019-12-05 13:35:37
Kindly help me with this issue . I am using tabbarcontroller in my App, [tabBarController setViewControllers:tabs]; tabs Contain array of viewcontrollers (6 viewcontrollers). It automatically created more button. ISSUE When I open any viewcontroller from more button and then open any other controller from index 0 to 2 , and then press more button it maintain the last opened viewcontroller . For Example: more button tableviewcontroller screen : Now when i press Contacts let say Now when user press any other tabbar like feature tab bar Now when user go back to more tab it shows the contact's

tab bar did select delegate methods give the previously selected tab index in ios, swift 3

一笑奈何 提交于 2019-12-05 12:48:01
I'm trying to detect which tab selected by the user, realtime. as an example, if user selecte 0 th index, at the same time I want to get that user has selected the zeroth index tab. so for that , I used tabbarcontroller delegate method like below. override func tabBar(_ tabBar: UITabBar, didSelect item: UITabBarItem) { print("the selected index is : \(selectedIndex)") } but this shows the previous view controller.as an example think I'm in second tab and then I select the first tab then this prints the index as 2 .so how can I get the correct selected tab. hope your help with this. You can get

how to set individual tabbaritem icons in uitabbarcontroller in cocoa

▼魔方 西西 提交于 2019-12-05 12:45:48
I was answered how to set images in general for a uitabbarcontroller. however my uitabbarcontroller is an array of views that looks like: tabBarController = [[UITabBarController alloc] init]; viewTab1controller = [[ViewTab1Controller alloc] initWithNibName:@"ViewTab1" bundle:nil]; viewTab1controller.title = @"Schedules"; navigationTab1Controller = [[[UINavigationController alloc] initWithRootViewController:viewTab1controller] autorelease]; [viewTab1controller release]; viewTab2controller = [[ViewTab2Controller alloc] initWithNibName:@"ViewTab2" bundle:nil]; viewTab2controller.title = @"Nearest

Determine viewWillAppear from Popped UINavigationController or UITabBarController

為{幸葍}努か 提交于 2019-12-05 12:36:38
I am unable to find a way to distinguish between popping from the Nav controller stack and entering the view controller from the UITabBarController. I want to call a method in ViewWillAppear only when the view is presented from the TabBar, not when someone presses back in the navigation controller. If I wasn't using a TabBarController, I could easily get this functionally using viewDidLoad. I've tried, override func viewWillAppear(animated: Bool) { super.viewWillAppear(animated) println("View Will Appear") if isBeingPresented() { println("BP") } if isMovingFromParentViewController() { println(

Disable/Enable tabs in UITabBarController in storyboard-based app

旧街凉风 提交于 2019-12-05 12:18:54
I've built my app with storyboards and all views are managed by a tabbarcontroller. So on launch (I'm only working on the iPad UI currently) it does this: - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) { UITabBarController *tabBarController = (UITabBarController *)self.window.rootViewController; UISplitViewController *splitViewController = [tabBarController.viewControllers objectAtIndex:0]; UINavigationController *navigationController =

What's the best way of adding a custom centre button to a tab bar?

丶灬走出姿态 提交于 2019-12-05 12:11:56
Many apps have a standard tab bar with a custom button in the centre which performs some special function. Some examples can be found here: http://mobile-patterns.com/custom-tab-navigation What's the best way of implementing this? Here you can see how to implement that button. I am gonna paste the code so it stays here forever: UIButton* button = [UIButton buttonWithType:UIButtonTypeCustom]; button.frame = CGRectMake(0.0, 0.0, buttonImage.size.width, buttonImage.size.height); [button setBackgroundImage:buttonImage forState:UIControlStateNormal]; [button setBackgroundImage:highlightImage

How can I have my iPhone app start with a specific screen showing?

旧城冷巷雨未停 提交于 2019-12-05 11:56:04
I have a big app with lots of screens, all arranged in a hierarchy, with a UITabBarController at the top, UINavigationControllers below that, and then UIView Controllers below those, maybe with a modal controller somewhere thrown in for good measure. The user is allowed to pick a start screen from a list. Once selected, next time the app is started it will start from the specified screen and all the navigation will work as if they had navigated there themselves. Since I can't subclass UITabBarController and UINavigationController, I can't add any ivars to set any initial navigation information

Tab bar not showing icons?

一笑奈何 提交于 2019-12-05 11:26:29
问题 I read a bunch of related questions, I tried what they said, nothing works really. Not sure why. So, I have 3 different UIStoryboards . First one is the Auth Storyboard that handles Login/Register and there's a storyboard reference to the second Storyboard - Tab bar storyboard. This storyboard contains 5 other storyboard references that would load it's separate view controllers. My problem is that the icons are not showing once the user is logged in. I setup a custom color of the first view

How do I correctly set a UIViewController's navigationController title?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-05 10:46:11
I am trying the following code: - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { Thing *sub = [[subscriptions objectAtIndex:indexPath.row] retain]; StoriesViewController *thing = [[StoriesViewController alloc] initWithThing:sub]; thing.navigationController.title = sub.title; [self.navigationController pushViewController:thing animated:YES]; [thing release]; [sub release]; [tableView deselectRowAtIndexPath:indexPath animated:YES]; } I thought this is how you correctly set the title for pushing the controller. I tried thing.title however that was

why does selecting a tabbarController index programatically doesnt call delegate method

懵懂的女人 提交于 2019-12-05 09:40:58
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 setSelectedViewController:[self.tabBarController.viewControllers objectAtIndex:0]]; the delegate methods are not called.