uinavigationcontroller

How to implement tab bar controller with navigation controller in right way

雨燕双飞 提交于 2019-12-17 02:42:50
问题 I am using Storyboard and Xcode 6. I have next controllers and scenes in my Storyboard: UINavigationController that has HomeViewController as a root. HomeViewController has a button that Show (e.g. Push) UITabBarController . UITabBarController has 4 UIViewControllers . But my problem that after I Show UITabBarController there are no Navigation Bars in 4 UIViewControllers . But I supposed that if I Show (e.g. Push) UITabBarController then it should has embedded navigation controller that is

Navigation bar title color looks different from app to app in ios

你离开我真会死。 提交于 2019-12-14 04:07:14
问题 I have created two app. In both the apps I have used the navigation Controller and have used the same code. But in first app the navigation bar title appears as white but in second its black.. Can anyone help me to solve this. I didnt use any code for separately for navigation bar. Thanks in advance. 来源: https://stackoverflow.com/questions/27191994/navigation-bar-title-color-looks-different-from-app-to-app-in-ios

Tab Bar disappears below the bottom of the screen

喜欢而已 提交于 2019-12-14 03:58:08
问题 In my application I'm using a Navigation Controller to push one view that loads a Tab Bar Controller and a custom Navigation Bar as well. The problem is that the Tab Bar disappears below the bottom of the screen, and I don't know what's causing the problem. If I load a simple Tab Bar in the next view, it positions itself correctly... but what I need is a Tab Bar Controller, and in that case the Tab Bar disappears below the bottom. I have tried changing the view and size properties of the Tab

why does this different “addSubView” code cause differences in behavior

江枫思渺然 提交于 2019-12-14 03:40:03
问题 Why does changing the below code from the Old to New entry fix the following problem. Code: // OLD Entry - Did not work //[self.window addSubview:navigationController.view]; // NEW Entry - Fixed it self.window.rootViewController = self.navigationController; Problem when I use Old Code: I'm using a UINavigationController and have a "mainView" UITableViewController and then a 2nd level view I push onto the stack, let's call it "detailedView" UITableViewController. Navigating normally back and

self.navigationController is nil in swift

若如初见. 提交于 2019-12-14 03:33:31
问题 I have 6 to 7 viewControllers in my storyBoard and in this view controller I get self.navigationController as nil but works every where else . I've done the same thing every other place but this one doesn't work. I couldn't figure out why? import UIKit class wkScreen2ViewController: UIViewController, UITableViewDataSource, UITableViewDelegate { @IBOutlet weak var tableView: UITableView! override func viewDidLoad() { super.viewDidLoad() // tableView.estimatedRowHeight = 500 tableView.rowHeight

Communication between view controllers

冷暖自知 提交于 2019-12-14 01:19:01
问题 Given the section of an application which has a UINavigationController and 2 levels of UITableViews (i.e. a row is selected on the root controller which pushes the second controller onto the navigation stack) I have the following questions: 1) There is a User object which is required by both controllers. What is the best way to communicate between the two controllers? I have seen a post on this site which mentions dependancy injection and that the root controller could pass the User object to

controlling display coordinates of view item added to toolbar

萝らか妹 提交于 2019-12-13 21:23:29
问题 I want to have precise control over the custom view I add to my UINavigationController toolbar. More specifically.. i want to display a UILable ontop of the items in my toolbar. I have a toolbarItems initially set up with some UIBarButtonItems . The effect I'm trying to achieve is programmatically expand the height of the toolbar, and then display a UILabel ontop of the rest of the buttons.. this is what I currently have: -(void)expandToolBar:(NSString *)title { UIToolbar* toolBar =self

How to create a navigation transition like the Apple news app?

大憨熊 提交于 2019-12-13 20:15:37
问题 I found this article to create a navigation transition like the Apple news app: https://blog.rocketinsights.com/how-to-create-a-navigation-transition-like-the-apple-news-app/. The transition is a zoom effect. The code works great for push animation, but for pop animation (to close DetailViewController), I have a black screen instead my main viewcontroller. As the article doesn't provide the full source code to download, I publish it on github, apply to UICollectionViewController for my needs:

How to dismiss a navigation controller presented from another navigation controller in iOS 10 and below?

夙愿已清 提交于 2019-12-13 20:08:24
问题 I'm presenting a UINavigationController from another UINavigationController like this: let customNavigationController = CustomNavigationController() customNavigationController.viewControllers = [myController] customNavigationController.modalPresentationStyle = .custom self.navigationController.present(customNavigationController, animated: true, completion: nil) Then, when a "close" button tapped, I try to dismiss it like this: navigationController.dismiss(animated: true, completion: nil) That

UINavigationController not popping UINavigationBar items on iPad

谁都会走 提交于 2019-12-13 18:32:30
问题 I'm having a very strange problem with the UINavigationController. I found a very similar question here: UINavigationController not popping UINavigationBar items but the solution there had to do with the fact that the guy had added a category to NSMutableArray, and I'm not doing anything like that. In short, the problem is this: I have a navigation controller and I'm pushing a few view controllers on it. Then when the 'back' button is tapped the view controller is popped, but the