uinavigationcontroller

Setting action for back button in navigation controller

两盒软妹~` 提交于 2019-12-29 08:32:31
问题 I'm trying to overwrite the default action of the back button in a navigation controller. I've provided a target an action on the custom button. The odd thing is when assigning it though the backbutton attribute it doesn't pay attention to them and it just pops the current view and goes back to the root: UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithTitle: @"Servers" style:UIBarButtonItemStylePlain target:self action:@selector(home)]; self.navigationItem.backBarButtonItem =

UITabBar functionality without UITabBarController

浪子不回头ぞ 提交于 2019-12-29 08:22:09
问题 I have this problem, I've got a navigation-based application, and on the one of the detail view i need to have UITabBar, which will display some UITableViews. Since apple documentation says "you should never add a tab bar controller to a navigation controller" it make quite a problem, i've found this sample: link text, it's working, but after picking one of the table view, the UITabBar disappears. 回答1: Now that you are not using a TabBarController for showing the tableviews (as mentioned in

UITabBar functionality without UITabBarController

a 夏天 提交于 2019-12-29 08:22:06
问题 I have this problem, I've got a navigation-based application, and on the one of the detail view i need to have UITabBar, which will display some UITableViews. Since apple documentation says "you should never add a tab bar controller to a navigation controller" it make quite a problem, i've found this sample: link text, it's working, but after picking one of the table view, the UITabBar disappears. 回答1: Now that you are not using a TabBarController for showing the tableviews (as mentioned in

Static/fixed Navigation Bar in iOS

徘徊边缘 提交于 2019-12-29 07:55:12
问题 I have a Navigation Controller and a Collection View under it inside my app. And there is a problem: I use large title inside my Navigation bar, so everything inside is not static. When I scroll the collection view cells, the title (I created it manually using UILabel() to move it as I want inside the navigation bar) and buttons move up and the navigation bar takes form of iOS 10 navigation bar, I mean its height. You can see it here: The normal state of my Navigation Bar with "Prefer large

How to make UINavigationBar background transparent?

我的梦境 提交于 2019-12-29 06:45:31
问题 First of all, I've seen all the answers at How to make UINavigationBar Transparent in IOS 8? Transparent UINavigationBar and Make UINavigationBar transparent. They just don't seem to work for me. My regular view controller (before trying to make the navigation bar transparent) doesn't have any issues: I'm using (tried both in viewDidLoad and viewWillAppear: ): [self.navigationController.navigationBar setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsDefault]; self

How to make UINavigationBar background transparent?

◇◆丶佛笑我妖孽 提交于 2019-12-29 06:45:10
问题 First of all, I've seen all the answers at How to make UINavigationBar Transparent in IOS 8? Transparent UINavigationBar and Make UINavigationBar transparent. They just don't seem to work for me. My regular view controller (before trying to make the navigation bar transparent) doesn't have any issues: I'm using (tried both in viewDidLoad and viewWillAppear: ): [self.navigationController.navigationBar setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsDefault]; self

popViewControllerAnimated: custom transition animation?

橙三吉。 提交于 2019-12-29 06:21:10
问题 Yes, I have looked for an answer already. None of the solutions work, except one that doesn't give the option for a fade transition, only flip or curl. Like this: methodname configure animation [self.navigationController popViewControllerAnimated:NO]; No matter what variety of transition animation config I try, nothing is visibly different from only using the typical single-line pop. If I change it to …Animated:YES]; , I get the standard pop animation, maybe with something weird happening

iOS 9: Frame no longer set in viewWillAppear after UINavigationController pushViewController

给你一囗甜甜゛ 提交于 2019-12-29 04:37:26
问题 I'm trying to solve a view placement bug that has arisen as of iOS 9. I am instantiating a view controller from a xib file (non-autolayout) and then pushing this onto my UINavigationController . The problem is that when the view controller's viewWillAppear method is called, its frame has not yet been adjusted to the navigation controller's size and is still what was set in the xib file. It doesn't get set properly now until viewDidAppear . This is completely screwing up my code. Does anyone

image for nav bar button item swift

限于喜欢 提交于 2019-12-29 04:12:11
问题 I want to display an image in the left hand side of my nav bar in swift. I have tried adding a nav bar button item and setting an image there. The problem is that I have to use a really small image for it to fit in the nav bar nicely. But making such a small image leads to pixelation especially on the bigger phone iPhone 6 and 6 Plus. Is there a way to use a good quality image and then set the frame to fit within the bounds of the nav bar? My attempt: var image = UIImage(named: "Harp.png")

Is it possible to push a View Controller with a completion block?

时光怂恿深爱的人放手 提交于 2019-12-29 03:31:08
问题 UINavigationController's documentation contains no pushViewController methods with a completion: parameter. 回答1: I would go with @justMartin's answer . But below is another approach. push animation take 0.3 seconds.So, if you want to run some function here after completion use performSelector after 0.3 seconds of delay. [self performSelector:@selector(completedPushing:) withObject:nil afterDelay:.3]; OR After pushing the new viewController onto navigation stack ,the old viewController view is