uitabbar

Prevent UITabBar to hide when pushed

十年热恋 提交于 2019-12-02 08:43:35
First let me tell about my app scenario. UINavigationController {relationship} UIViewControllerMain {push} UITabController {push} UIViewControllerOne . Here problem is tab bar hides in UIViewControllerOne . How can i make it visible? self.tabBarController.tabBar.hidden = NO; 来源: https://stackoverflow.com/questions/12244816/prevent-uitabbar-to-hide-when-pushed

My Tab bar controller disappears after a push segue

左心房为你撑大大i 提交于 2019-12-02 07:25:58
Here is the setup of my app: Navigation- -loginVC -if login is valid, pushes segue to- tab bar controller with 3 tabs: -in the first tab, is a profile display which modal pushes to a profile editor(not issue here) -second tab is a searchVC that pushes to a tableVC that shows results. This is where the tab bar disappears -The third view is just a VC for updating the database this is linked to. This is literally how it works on the storyboard, and I've made sure the segue from the searchVC to the tableVC, is a push segue. How can I keep the tab bar controller from disappearing on this second

Custom UITabBar subclass without Interface Builder

南楼画角 提交于 2019-12-02 05:57:50
Using IB (be it with a Storyboard or a XIB), one can easily have the UITabBarController use a subclass of UITabBar, by editing the class name in the Identity Inspector -> Custom Class. How to mimic this "custom class" feature of IB, without using it at all ? I tried the following (in my subclass of UITabBarController) : var customTabBar = MyCustomTabBarSubclass() override var tabBar: UITabBar { return customTabBar } To no avail – the tab bar is displayed, but blank. The issue is not elsewhere since return ing super.tabBar from the overriden var fixes it. The issue, I guess, is that I'm not

UITabBarController only showing half of its UITabBar (off screen)

牧云@^-^@ 提交于 2019-12-02 05:46:05
My UITabBar is not completely showing after I present a UITabBarController from a UIViewController. Please can you tell me what I am doing wrong? My code is: //some method LoggedInViewController *lvc = [[[LoggedInViewController alloc] initWithAccount:account] autorelease]; [self presentModalViewController:lvc animated:YES]; - (void)viewDidLoad { self.tabController = [[UITabBarController alloc] init]; LoggedInFeedNavigationController *navController = [[LoggedInFeedNavigationController alloc] initWithAccount:self.account]; [self.tabController setViewControllers:[NSArray arrayWithObject

How can I substitute the UITabBar of UITabBarController programmatically

£可爱£侵袭症+ 提交于 2019-12-02 01:03:36
问题 I need to use a subclass of the UITabBar for my project because of the following problem Why page Push animation Tabbar moving up in the iPhone X. I do not use storyboards. How can this be done programmatically? -- update -- My CustomTabBarController.swift file now looks like this: import UIKit @objc class customTabBarController: UITabBarController { override var tabBar: UITabBar { return customTabBar } } And my CustomTabBar.swift file looks like this: import UIKit class customTabBar:

How to change UITabBarItem Badge position?

霸气de小男生 提交于 2019-12-01 21:27:26
This is how my Tabbar is looking right now. How do I move that badge so that it overlaps the top right of the bell icon? Any help is appreciated. try this: func repositionBadge(tabIndex: Int){ for badgeView in self.tabBarController!.tabBar.subviews[tabIndex].subviews { if NSStringFromClass(badgeView.classForCoder) == "_UIBadgeView" { badgeView.layer.transform = CATransform3DIdentity badgeView.layer.transform = CATransform3DMakeTranslation(-17.0, 1.0, 1.0) } } } pay attention, tabIndex starts from 1 Based on Marco Santarossa's answer , I updated it by making it into a UITabBarController

detect when a tabBar item is pressed via UITabBarController from App Delegate

旧城冷巷雨未停 提交于 2019-12-01 17:37:17
I know this question has been asked a few times, but I am still stuck on the case when I have my UITabBarController in my AppDelegate class and viewControllers are set there only as self.tabBarController.viewControllers = @[aboutUsNavController,myProfileNavController, projectsListNavController, feedsNavController,homeViewController]; Now what I want is to perform a task at the tap of TabBar item feedsNavController not in viewWillAppear (because it is pushing a detailView via navigationController ). I have set delegate in the same class to perform a UITabBarController delegate method:

detect when a tabBar item is pressed via UITabBarController from App Delegate

我只是一个虾纸丫 提交于 2019-12-01 17:23:45
问题 I know this question has been asked a few times, but I am still stuck on the case when I have my UITabBarController in my AppDelegate class and viewControllers are set there only as self.tabBarController.viewControllers = @[aboutUsNavController,myProfileNavController, projectsListNavController, feedsNavController,homeViewController]; Now what I want is to perform a task at the tap of TabBar item feedsNavController not in viewWillAppear (because it is pushing a detailView via

uitabbarcontroller / uitabbar in navigation based project

牧云@^-^@ 提交于 2019-12-01 12:49:49
I have created navigation based project. and in second screen i want to add uitabbarcontroller. so can any one suggest how i do this. i already did lot of search but no success yet. so please can you provide a simple sample of this. i already tried below discussion but i think its not a good approach. Navigation Based Application with TabBar Thanks Actually this is the correct approach. The one thing that is not correct is where the controllers are allocated. This is happened in the previous controller, the one that is making the push, but should be allocated in the object that is responsible,

Programmatically Setting UITabBar Titles

不想你离开。 提交于 2019-12-01 11:53:56
问题 i had programetically add the tabbar as shown below:- FirstViewController *obj_FirstViewController = [[FirstViewController alloc] initWithNibName:@"FirstViewController" bundle:nil]; SecondViewController *obj_SecondViewController = [[SecondViewController alloc] initWithNibName:@"SecondViewController" bundle:nil]; ThirdViewController *obj_ThirdViewController = [[ThirdViewController alloc] initWithNibName:@"ThirdViewController" bundle:nil]; navigation1 = [[UINavigationController alloc]