uitabbarcontroller

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

女生的网名这么多〃 提交于 2019-12-07 05:00:59
问题 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

Custom action when clicking on UITabBarController

邮差的信 提交于 2019-12-07 03:13:29
问题 I have a Tab Bar Controller with four navigation controllers added to it. The navigation controllers appear as Tab Bar Items in the Tab Bar Controller. Now I want to add a fifth button to the tab bar, that does not open another view, but triggers some custom code. I want to display an overlaying "share menu" when clicking that Tab Bar Item regardless on which of the four pages the user is. How can I do that? 回答1: I can suggest to add dummy UIViewController to the last index and handle

How are people popping their UINavigationController stacks under a UITabBarController?

让人想犯罪 __ 提交于 2019-12-07 02:50:28
I have four UINavigationControllers assigned each to a tab in a UITabBarController. Each UINavigationController manages a UIViewController, which may itself branch out into other UIViewControllers below it hierarchally. My question is, in a case in which a user, under one tab, has navigated to a UIViewController that hierarchally BELOW the main UIViewController managed by the UINavigationController, and then the user pushes a different tab, and then goes back to the original tab, HOW can I make it so that the user is presented with the main UIViewController managed by the UINavigation

Change the color of moreNavigationController's icons

房东的猫 提交于 2019-12-07 01:40:58
问题 I've managed to change the navBar tint, the background color and labels' color using this. But is it possible to change the icons' color? (those left to tableview's labels) Thanks! 回答1: I don't know of a way to change the icon colors, but I don't really think all this hacking is necessary anyway - Apple certainly doesn't recommend it. As far as I can tell, there is nothing special about the moreViewController, apart from being hard to customize. If it were me, I'd simply create my own custom

Tableview last row is cut off under tabbarcontroller

南笙酒味 提交于 2019-12-06 20:00:30
I'm having a Tabbarcontroller and in the first tabview I'm having a tableviewcontroller. Now the last row is half visible the rest is underneath the tabbarcontroller. I've unchecked extend edges in the interface builder of my tabbar controller but nothing changes. I also tried this in my tableview controller: self.edgesForExtendedLayout = UIRectEdgeNone; But still the last row is half underneath the tabbar. Someone an idea how I can solve this? Try this inside viewDidLoad method - (void)viewDidLoad { [super viewDidLoad]; self.edgesForExtendedLayout = UIRectEdgeAll; self.tableView.contentInset

UITabbarController in Xcode 8 shows a blue rectangle inside a storyboard view

孤者浪人 提交于 2019-12-06 18:37:58
问题 How can I fix this ? I can't see anything at all. 回答1: Edit: This bug will be fixed in the next release of Xcode 8.2, make sure to update. Xcode 8.2 Release Notes Ok, so I found out how to remove the blue rectangle. If I add an image to the button of the tab bar the rectangle will disappear. And The end result: 回答2: just set images to each tab bar in every view controller. and this bug will go automatically. in my case this was the solution. 来源: https://stackoverflow.com/questions/39540095

Programmatically setting tabBarItem title in Swift

无人久伴 提交于 2019-12-06 18:20:18
问题 I have four UIViewControllers that are linked to a UITabBarController's tab bar. I need to set the tab bar item titles outside of the storyboard, and inside of their classes. I've tried.. class MyViewController: UIViewController { required init(coder aDecoder: NSCoder) { super.init(coder: aDecoder) self.title = NSLocalizedString(MyConstants.StringKeys.TabName, tableName: Constants.Strings.MyTable, comment: Constants.EmptyString); } } This is called, but the title is never set. Same with self

TabBarController in NavigationController does not show TabBar in viewControllers

狂风中的少年 提交于 2019-12-06 16:38:17
I have a UITabBarController to whose controllers I would like to attach navigation. So I inserted the NavigationController as the entry controller, and the tabBarController as its root. All seems working fine, but for the tabBar. Basically it does not show, albeit the StoryBoard I attach seems to say differently. I also attach the Account Screen not showing any navigation bar nor, of course, any back button. Thanks, Fabrizio Just a quick answer. I think you should put UINavigationController inside the TabBarController instead of the other way round. It will solve most of your problems. Steps:

How to pass information between two UIViewControllers in a in a UITabBarController

余生颓废 提交于 2019-12-06 16:32:37
In my iPhone App, there are two UIViewControllers; both are embedded in a UITabBarController. However, when the TabBarController is tapped, and the VC's switch, the VC on screen uploads data to NSUserDefaults and then the VC that get switched to, fetches that data from NSUserDefaults. What I currently do is upload data in viewWillDisappear of the first VC and then fetch it in viewWillAppear of the second VC. the problem is that viewWillAppear of the VC that is about to get put on screen is called before viewWillDisappear of the "old" VC so it tries to get data that isn't uploaded yet. What can

How to Create a Custom tabBarController to simulate uiTabBarController

情到浓时终转凉″ 提交于 2019-12-06 16:16:17
问题 How to create an custom tabbar controller which has custom background image, custom icons, and custom labels and positioning but serves exactly the same purpose as UITabBarController. I badly seeking for an optimal solution for this. When i learn the solution this will really help me to write a generic wrapper and save more time. I have tried having UIViews and making it as footer and banner seperately, but it all consumes lots of memory. I want a simplistic approach which will make the