uinavigationcontroller

Recognize tap on navigation bar title

瘦欲@ 提交于 2019-12-18 12:46:03
问题 Could someone please help me recognise a tap when a user taps on the Title in the Navigation Bar ? I would like to recognise this tap and then animate the tableHeaderView appearing. Possibly sliding the TableView down. The idea being that the user can then select a quick option (from the tableViewHeader) to re-populate the TableView. However I cannot recognise any taps. I'm using Swift. Thank you. 回答1: UINavigationBar does not expose its internal view hierarchy. There is no supported way to

View being blocked by UITransitionView after being presented

我的梦境 提交于 2019-12-18 12:18:45
问题 I have a side navigation controller and present it via a UIButton. When I make this NC the root view controller directly by [self presentviewcontroller: NC animated: YES completion: nil] , some reason the menu side of the NC is blocked by a UITransitionView that I cannot get to disappear. I've attached an image of the . is another. I have tried the following: UIWindow *window = [(AppDelegate *)[[UIApplication sharedApplication] delegate] window]; window.backgroundColor = kmain; CATransition*

ViewController in UINavigationController orientation change

只谈情不闲聊 提交于 2019-12-18 11:29:48
问题 So I have the following hierarchy: UINavigationController --> RootViewController ( UIViewController ) --> UITableViewController --> DetailViewController ( UIViewController ) I want to lock the orientation on RootViewController to Portrait only, but leave all orientations for the rest view controllers. If I put this to subclassed UINavigationController : - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { // Return YES for supported orientations return

The correct way to set a light status bar text color in iOS 7 based on different ViewControllers

不想你离开。 提交于 2019-12-18 11:26:16
问题 I need to let a specific ViewController embedded in an UINavigationController to have light status bar text color (but other ViewController s to behave differently). I am aware of at least 3 methods, none of which however work in my case. How to change Status Bar text color in iOS 7, the method is primarily: Set the UIViewControllerBasedStatusBarAppearance to YES in the plist In viewDidLoad do a [self setNeedsStatusBarAppearanceUpdate]; Add the following method: - (UIStatusBarStyle

Touch and pull down a view

折月煮酒 提交于 2019-12-18 11:14:18
问题 I have a uiview at the top of the interface (below the status bar) that only the bottom part of it is shown. Actually, I want to make the red uiview to slide down to be entirely shown by drag such as the notificationcenter in the native iOS and not just by taping a button. What should I use to "touch and pull down" the uiview so it could be shown entirely ? 回答1: Make a subclass of UIView . Override touchesBegan:withEvent and touchesMoved:withEvent . In the touchesBegan perhaps make a visual

Pass data through navigation back button

只愿长相守 提交于 2019-12-18 10:49:17
问题 I am in this situation: I am passing 4 array from Progress Table to Detail Exercise using prepare for segue and it works fine! The problem begin when I try to pass the data back from the Detail Exercise Controller to the Progress Table Controller. I would like to use the default navigation back button to go back to the parent view. Actually I'm using this code but it doesn't work, well the data pass from the child to the parent view but i can't see the result in the Progress Table, seems like

UIPageViewController within NavigationController

℡╲_俬逩灬. 提交于 2019-12-18 10:14:41
问题 I've read every tutorial I've found about UIPageViewController, but they show just basics, I'd like to create something like new twitter app has: UIPageViewController is embedded into Navigation controller, title of navigation bar is based on current page and those page dots are there as well, user can tap on item on current page(item from table view/collection view) to see detail. I was able to come up with something similar, each page had collection view, and showing detail of some item was

iOS: Removing UINavigationBar animation

烂漫一生 提交于 2019-12-18 09:49:55
问题 Our app has an UINavigationBar with an image on it. When we segue (push) to another screen then click the back button the image on the Navigation Bar seems to animate from left to right as it reappears. This is a little distracting. How can you remove this back button animation? We tried changing the segue Animates setting but this changes both the push animation and not the back animation. Our Nav Bar code: let logoImage:UIImage = UIImage(named: "ABC")! viewController.navigationItem

Custom UITabBarController and UINavigationController

假装没事ソ 提交于 2019-12-18 09:48:13
问题 I'm developing an app for iOS5 and up and I don't use storyboards or IB. I'm creating a custom UITabBarController and in my AppDelegate I'm putting in it 4 view controllers with only 1 UINavigationController (can't tell why). It results in a behaviour where I can push new VC only from the first tab, which is apparently, packed into a UINavigationController called navController : SGTabBarController *tabBarController = [[SGTabBarController alloc] init]; SGHomeViewController* vc1 = [

Programmatically change height of navigation bar in swift

这一生的挚爱 提交于 2019-12-18 06:59:57
问题 I want to make a taller navigation bar and I am trying to do this using a subclass of UINavigationBar. Here is my subclass of UINavigationBar: import UIKit class TallerNaviBar: UINavigationBar { override func sizeThatFits(size: CGSize) -> CGSize { var newSize:CGSize = CGSizeMake(size.width, 87) return newSize } } And in my ViewController which is embedded in a navigation controller, I write the following code in the viewDidLoad() function self.navigationController!.setValue(TallerNaviBar