uinavigationcontroller

Sharing the Same UIViewController as the rootViewController with Two UINavigationControllers

早过忘川 提交于 2019-12-20 09:57:09
问题 Update: I have decided to go a different route with my problem. Instead of trying to reuse the same UIViewController directly, I use two vanilla UIViewControllers that are set as rootViewControllers . In their loadView methods, they make a call to [storyboard instantiateViewControllerWithIdentifier:] to get the former UIViewController and set their views to the controller's view. This is probably the preferred approach anyway, since I need to set several variables and delegates. I have a

Animate a UINavigationBar's barTintColor

自古美人都是妖i 提交于 2019-12-20 09:55:41
问题 The app I'm working on changes the barTintColor of its navigation bar when pushing new view controllers. Right now we set that colour in the destination view controller's viewWillAppear: method, but we have a few issues with that. With the way we're doing this right now, the navigation bar's colour changes abruptly, while the rest of the bar content animates as usual. What I'd like is for the bar to fade between the source and destination colour. Is there any way to achieve this with public

how to create pinterest style hiding/unhiding nav/tab bar?

梦想与她 提交于 2019-12-20 09:39:57
问题 How do I create a hiding/unhiding nav bar like what pinterest and many other apps is doing? I know the basic idea is to use the UIScrollView delegate and detect whether I am scrolling up or down and show the nav bar based on that. So should I also adjust the navcontroller view height if the nav bar is hidden? How does this work? 回答1: I have a sample project located on github that does exactly the pinterest/piictu style 'hide the UINavigationController / UITabBarController stuff' https:/

Add toolbar to UITableViewController

末鹿安然 提交于 2019-12-20 08:36:51
问题 What is the simplest way to add UIToolBar to UITableViewController? I'm depending on edit functionality, so I can't change UITableViewController to UIViewController easily. 回答1: No problem at all, UITableViewController is a subclass of UIViewController . And it so happens that in iPhone OS 3.0 any UIViewController (and subclasses) can work in conjunction with a UINavigationController to provide a context aware toolbar. In order for this to work you must: Make sure that you use a

Weird uitableview behaviour in iOS11. Cells scroll up with navigation push animation

荒凉一梦 提交于 2019-12-20 08:17:33
问题 I have recently migrated some code to new iOS 11 beta 5 SDK. I now get a very confusing behaviour from UITableView. The tableview itself is not that fancy. I have custom cells but in most part it is just for their height. When I push my view controller with tableview I get an additional animation where cells "scroll up" (or possibly the whole tableview frame is changed) and down along push/pop navigation animation. Please see gif: I manually create tableview in loadView method and setup auto

Custom Back Button With Image

自古美人都是妖i 提交于 2019-12-20 07:49:03
问题 What I'd like to do is alter the height of the back button. However, as I understand it, the only option to alter is width. So, I thought I'd create a custom back button with my own, smaller, image. Now I've done this using the viewDidLoad method with the code below: //Setup navigation bar navigationController?.navigationItem.backBarButtonItem = UIBarButtonItem(image:UIImage(named:"back_arrow.png"), style:UIBarButtonItemStyle.Plain, target:nil, action:nil) navigationController?.navigationItem

How to add scope buttons in a UISearchController embedded in UINavigationController

狂风中的少年 提交于 2019-12-20 06:56:41
问题 I have an App that is presenting a MKMapView embedded in a UINavigationController. In the UINavigationController I have put a UISearchController. When the User touch the UISearchController it displays a UITableViewController. It works well while I'm not adding the Scope button in the UISearchController. Here the screenshot of the UISearchController in the UINavigationController when I start the App. Next when I touch the UISearchController, it displays the UITableViewController and scope

Replacing UINavigationControllers NavigationBar with UIView

大城市里の小女人 提交于 2019-12-20 06:18:11
问题 I am developing app that has multiple skins and I have a dilema on how to implement this. One of the solutions would be to have separate nib files for every skin, and load it depending on wich skin is currently selected. Problem with this is that I can't edit navigation bar of navigation controller (wich my app uses), and I have to change it's background image and back button image etc.. I came up with an idea to hide this navigation bar on every screen and replace it with custom UIView in

In PageViewController navigation not working

你说的曾经没有我的故事 提交于 2019-12-20 06:13:46
问题 I have 3 types of VC's , 1st Vc, 2nd VC is PageViewController with 3 pages(I added PageController to normal ViewController here), third one is FinalViewController . 1st VC has button when i click it will move to 2nd VC that is PageViewController (It has 3 pages[3 ViewConrollers ] working fine). In PageViewController after loading first VC, it has view with gestures when i tap that i want to navigate FinalViewController completely. Here navigation not working. My 1st VC code override func

In PageViewController navigation not working

若如初见. 提交于 2019-12-20 06:13:01
问题 I have 3 types of VC's , 1st Vc, 2nd VC is PageViewController with 3 pages(I added PageController to normal ViewController here), third one is FinalViewController . 1st VC has button when i click it will move to 2nd VC that is PageViewController (It has 3 pages[3 ViewConrollers ] working fine). In PageViewController after loading first VC, it has view with gestures when i tap that i want to navigate FinalViewController completely. Here navigation not working. My 1st VC code override func