ios7 - iOS 7 Navigationbar background image issue -


I am using the image as a navigation bar background image. To set the image, I use the following code:

  [[UINavigationBar presence] setBackgroundImage: [UIImage imageNamed: @ "nav_logo_ios7.png"] For Berrometrics: UIBarMetricsDefault]; The size of image "nav_logo_ios7.png" for iOS7 is 768x64 and the size of the image I used for iOS 6 and Bile is 768x44.  

This is working well on all UIViewControllers .

Enter image details here

In the same project I I am using UIActivityViewController . To view this on IOS7 mail, type:

Enter image details here

How can I handle it?

Thanks in advance.

The problem you are experiencing is that when UIViewController is presented in the original way If the status bar is not included in the height of UINavigationBar

This means that the 64pt image is wrong.

The first official and which version of the iOS is going to be a better way to see if something like this will happen:

  if ( NSFoundationVersionNumber & gt; NSFoundationVersionNumber_iOS_6_1) {// iOS 7 stuff} and {// handle older iOS versions} / << code>  

For more information, NSObjCRuntime.h See the header.

UINavigationBar background images should not really be an image of a certain size and instead should be draggable image such as reversible patterns o Maybe the idea of ​​reconsidering future designs ... though if you If you want to continue with the custom fixed size image, then I have a suggestion for you ...

The UIging controller allows you to start custom UINavigationBa An example using r and UIToolbar sections ... This means that you can include any ideas that you originally presented with a different UINavigationBar subclass for ideas presented in a fundamental way. Are not.

This means that you will be able to specify different background images depending on whether or not your navigation controller is presented in a fundamental way, for example:

 < Code> UIImage * backgroundImage44pts = [UIImage imageNamed: @ "..."]; UIImage * backgroundImage64pts = [UIImage imageNamed: @ "..."]; If (NSFWWSNumberNumber> NSFoundationVersionNumber_iOS_6_1) {// Handle iOS 7 Stuff [[UINavigationBar Appearance] Setbackgram Image: BackgroundEmetermetrics for Berrometrics: UIBarMetricsDefault]; [[UINavigationBarSubclass Presence] setBackgroundImage: 64 bitmatic for background image: UIBarMetricsDefault]; } Other {// Handling Older iOS Versions [[UINavigationBar Appearance] Setbackgram Image: BackgroundEightMetrics for Berrometrics: UIBarMetricsDefault]; }  

An important thing to note is that the MFMailComposeViewController is not an real view controller, so the custom navigation bar is trying to get started with subclasses. is. This is the reason why I have used a custom navigation bar subclass for all non-modal navigation controllers, and not the other way.

One more thing is that if your application is universal then model views are not present (unless you have some custom) and you will not have to worry about it.

As I said earlier ... the Uyenivation Burs are not designed for images actually fixed (this is why it is difficult to obtain) So if you think If this work is very complex then it is possible that it will be a good idea to reconsider your design.

And one last thing (I promise) ... one of the main designs is the contents of the change in iOS 7 from the navigation bar flowing under the status bar. Adding the image and changing it concrete white background looks odd for an iOS 7 app.


Comments