Questions tagged [uibarmetrics]

UIBarMetrics are the Constants to specify metrics to use for appearance of UIBArButtonItem in iOS sdk.

UIBarMetrics are the Constants to specify metrics to use for appearance of UIBArButtonItem in iOS sdk.

8 questions
7
votes
1 answer

Why am I getting an UIBarButtonItem customization warning?

I have a simple storyboard with a table view inside a navigation view controller that pushes from the table view to another view controller that has a full screen image view. The table view has a prompt text in it's navigation bar. When I tap on the…
Steve Moser
  • 7,647
  • 5
  • 55
  • 94
6
votes
1 answer

How would I find a UINavigationBar's current UIBarMetrics value?

I'm using the setBackButtonTitlePositionAdjustment:forBarMetrics: method on UIBarButtonItem's appearance like so: UIBarButtonItem.appearance().setBackButtonTitlePositionAdjustment(UIOffsetMake(12, -1), forBarMetrics:…
chrishale
  • 2,436
  • 2
  • 18
  • 19
2
votes
1 answer

Wrong background image for navigation bar

I ran into this issue in iOS 8 where the wrong background image for the navigation bar is displayed in any of these situations: the view controller-based status bar appearance is set to YES (default) and the navigation controller is presented…
albertamg
  • 28,492
  • 6
  • 64
  • 71
2
votes
1 answer

Changing UIToolbar UIBarMetrics

Is there anyway to have the UIBarMetrics of a custom UIToolbar change when the device is rotated? I would prefer it happen automatically but if there is something I can do during rotation that would also be ok. I would like to use UIAppearance so…
drewag
  • 93,393
  • 28
  • 139
  • 128
1
vote
0 answers

Setting image on UINavigationBar gives black status bar

The problem is the navigation bar's image sits below the status bar. I had this previously working by adding a subview to the navigation bar but it seems stupid to do that when I only want an image. I subclassed UINavigationController to deliver…
Ste Prescott
  • 1,789
  • 2
  • 22
  • 43
0
votes
2 answers

Swift 4 : Navigation Bar looks different for the next page

I just removed the navigation bar shadow line with the following code : self.navigationController?.navigationBar.setBackgroundImage(UIImage(), for: UIBarMetrics.default) self.navigationController?.navigationBar.shadowImage = UIImage() When I use…
jorjj
  • 1,479
  • 4
  • 20
  • 36
0
votes
1 answer

Setting UIToolBar Background image swift

I am using swift to make an IOS application. I have a UIToolBar in my application and I need to change its background. I use the following code in Objective-C to do that: [topBar setBackgroundImage:[UIImage imageNamed:@"header_bg.png"]…
Harikrishnan
  • 7,765
  • 13
  • 62
  • 113
0
votes
2 answers

converting to boxing syntax requires casting UIBarMetrics Warning

[self backgroundImages][[NSNumber numberWithInt:barMetrics]] = backgroundImage; How can I solve this warning?
Erhan
  • 908
  • 8
  • 19