iOS development changes the height and background picture of Uinavigationcontroller Uinavigationbar
Last Update:2015-04-16
Source: Internet
Author: User
<span id="Label3"></p><p style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px"><p style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">1, Change the height</p></p><p style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px"><p style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">New categories for customizing Uinavigationbar:</p></p><p style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px"><p style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px"></p></p><strong><strong>[cpp]</strong></strong>View Plaincopy<br> <ol start="1" class="dp-cpp" style="padding:0px; border:none; list-style-position:initial; background-color:rgb(255,255,255); color:rgb(92,92,92); margin:0px 0px 1px 45px!important"> <li class="alt" style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important"><li class="alt" style="border-style:none None None solid; border-left-width:3px; Border-left-color:rgb (108,226,108); List-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important "><span style=" margin:0px; padding:0px; border:none; color:black; Background-color:inherit "><span class=" Comment " style=" margin:0px; padding:0px; border:none; Color:rgb (0,130,0); Background-color:inherit ">//uinavigationbar+backgoundimage.h </span> <span style=" margin:0px; padding:0px; border:none; Background-color:inherit "> </span> </span> </li></li> <li style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; background-color:rgb(248,248,248); line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important"><li style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; background-color:rgb(248,248,248); line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important"><span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit"><span class="preprocessor" style="margin:0px; padding:0px; border:none; color:gray; background-color:inherit">#import <Foundation/Foundation.h></span> <span style="margin:0px; padding:0px; border:none; background-color:inherit"> </span></span></li></li> <li class="alt" style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important"><li class="alt" style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important"><span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit"></span></li></li> <li style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; background-color:rgb(248,248,248); line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important"><li style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; background-color:rgb(248,248,248); line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important"><span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit">@interface Uinavigationbar (backgoundimage)</span></li></li> <li class="alt" style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important"><li class="alt" style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important"><span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit"></span></li></li> <li style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; background-color:rgb(248,248,248); line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important"><li style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; background-color:rgb(248,248,248); line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important"><span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit">@end</span></li></li> </ol><br style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px"><span style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px"><span style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">in the implementation of the new category, methods that overwrite the original class-(void) drawrect: (cgrect) rect:</span></span><p style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px"><p style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px"></p></p><p style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px"><p style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px"></p></p><strong><strong>[cpp]</strong></strong>View Plaincopy<br> <ol start="1" class="dp-cpp" style="padding:0px; border:none; list-style-position:initial; background-color:rgb(255,255,255); color:rgb(92,92,92); margin:0px 0px 1px 45px!important"> <li class="alt" style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important"><li class="alt" style="border-style:none None None solid; border-left-width:3px; Border-left-color:rgb (108,226,108); List-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important "><span style=" margin:0px; padding:0px; border:none; color:black; Background-color:inherit "><span class=" Comment " style=" margin:0px; padding:0px; border:none; Color:rgb (0,130,0); Background-color:inherit ">//uinavigationbar+backgoundimage.m </span> <span style=" margin:0px; padding:0px; border:none; Background-color:inherit "> </span> </span> </li></li> <li style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; background-color:rgb(248,248,248); line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important"><li style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; background-color:rgb(248,248,248); line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important"><span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit"><span class="preprocessor" style="margin:0px; padding:0px; border:none; color:gray; background-color:inherit">#import "uinavigationbar+backgoundimage.h"</span> <span style="margin:0px; padding:0px; border:none; background-color:inherit"> </span></span></li></li> <li class="alt" style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important"><li class="alt" style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important"><span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit"></span></li></li> <li style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; background-color:rgb(248,248,248); line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important"><li style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; background-color:rgb(248,248,248); line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important"><span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit">@implementation Uinavigationbar (backgoundimage)</span></li></li> <li class="alt" style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important"><li class="alt" style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important"><span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit"></span></li></li> <li style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; background-color:rgb(248,248,248); line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important"><li style="border-style:none None None solid; border-left-width:3px; Border-left-color:rgb (108,226,108); List-style:decimal-leading-zero outside; Background-color:rgb (248,248,248); line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important "><span style=" margin:0px; padding:0px; border:none; color:black; Background-color:inherit ">- (<span class=" keyword " style=" margin:0px; padding:0px; border:none; Color:rgb ( 0,102,153); background-color:inherit; Font-weight:bold ">void </span> <span style=" margin:0px; padding:0px; border:none; background-color:inherit ">) layoutsubviews { </span> </span> </li></li> <li class="alt" style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important"><li class="alt" style="border-style:none None None solid; border-left-width:3px; Border-left-color:rgb (108,226,108); List-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important "><span style=" margin:0px; padding:0px; border:none; color:black; Background-color:inherit "> cgrect barframe = self.frame; </span></li></li> <li style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; background-color:rgb(248,248,248); line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important"><li style="border-style:none None None solid; border-left-width:3px; Border-left-color:rgb (108,226,108); List-style:decimal-leading-zero outside; Background-color:rgb (248,248,248); line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important "><span style=" margin:0px; padding:0px; border:none; color:black; Background-color:inherit "> barframe.size.height = 100.0; <span class=" Comment " style=" margin:0px; padding:0px; border:none; Color:rgb (0,130,0); Background-color:inherit ">//new Height </span> <span style="margin:0px; padding:0px; border:none; background-color:inherit"> </span> </span> </li></li> <li class="alt" style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important"><li class="alt" style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important"><span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit">Self.frame = barframe;</span></li></li> <li style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; background-color:rgb(248,248,248); line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important"><li style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; background-color:rgb(248,248,248); line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important"><span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit">}</span></li></li> <li class="alt" style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important"><li class="alt" style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important"><span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit"></span></li></li> <li style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; background-color:rgb(248,248,248); line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important"><li style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; background-color:rgb(248,248,248); line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important"><span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit"><span class="comment" style="margin:0px; padding:0px; border:none; color:rgb(0,130,0); background-color:inherit">//actually only need to overwrite the method on the line, change the self.frame.size.height to 100.0 OK</span> <span style="margin:0px; padding:0px; border:none; background-color:inherit"> </span></span></li></li> <li class="alt" style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important"><li class="alt" style="border-style:none None None solid; border-left-width:3px; Border-left-color:rgb (108,226,108); List-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important "><span style=" margin:0px; padding:0px; border:none; color:black; Background-color:inherit ">- (<span class=" keyword " style=" margin:0px; padding:0px; border:none; Color:rgb ( 0,102,153); background-color:inherit; Font-weight:bold ">void </span> <span style=" margin:0px; padding:0px; border:none; background-color:inherit ">) Drawrect: (cgrect) rect { </span> </span> </li></li> <li style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; background-color:rgb(248,248,248); line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important"><li style="border-style:none None None solid; border-left-width:3px; Border-left-color:rgb (108,226,108); List-style:decimal-leading-zero outside; Background-color:rgb (248,248,248); line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important "><span style=" margin:0px; padding:0px; border:none; color:black; Background-color:inherit "> uiimage *image = [uiimage imagenamed:@< Span class= "string" style= "margin:0px; padding:0px; border:none; color:blue; Background-color:inherit ">" logo.png "</span> <span style="margin:0px; padding:0px; border:none; background-color:inherit">]; </span> </li></li> <li class="alt" style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important"><li class="alt" style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important"><span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit">[image drawinrect:cgrectmake (0, 0, self.frame.size.width, self.frame.size.height)];</span></li></li> <li style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; background-color:rgb(248,248,248); line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important"><li style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; background-color:rgb(248,248,248); line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important"><span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit">}</span></li></li> <li class="alt" style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important"><li class="alt" style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important"><span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit"></span></li></li> <li style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; background-color:rgb(248,248,248); line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important"><li style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; background-color:rgb(248,248,248); line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important"><span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit">@end</span></li></li> </ol><p style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px"><p style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px"></p></p><p style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px"><p style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px"><br></p></p><p style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px"><p style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">The height of the Navigationbar in the project can be found to have Changed.</p></p><p style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px"><p style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">2, Next Change the background image, (refer to http://stackoverflow.com/questions/8375092/ Xcode4-2-storyboard-navigation-controller-how-to-set-custom-image-for-uinavig):</p></p><p style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px"><p style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">The delegate method in Xxxappdalegate.m:</p></p><p style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px"><p style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px"></p></p><strong><strong>[cpp]</strong></strong>View Plaincopy<br> <ol start="1" class="dp-cpp" style="padding:0px; border:none; list-style-position:initial; background-color:rgb(255,255,255); color:rgb(92,92,92); margin:0px 0px 1px 45px!important"> <li class="alt" style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important"><li class="alt" style="border-style:none None None solid; border-left-width:3px; Border-left-color:rgb (108,226,108); List-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important "><span style=" margin:0px; padding:0px; border:none; color:black; Background-color:inherit "><span style=" margin:0px; padding:0px; border:none; background-color:inherit ">- (</span> <span class="datatypes" style="margin:0px; padding:0px; border:none; Color:rgb (46,139,87); background-color:inherit; Font-weight:bold ">bool </span> <span style=" margin:0px; padding:0px; border:none; background-color:inherit ">) Application: (uiapplication *) application didfinishlaunchingwithoptions: (NSDictionary *) launchoptions </span> </span> </li></li> <li style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; background-color:rgb(248,248,248); line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important"><li style="border-style:none None None solid; border-left-width:3px; Border-left-color:rgb (108,226,108); List-style:decimal-leading-zero outside; Background-color:rgb (248,248,248); line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important "><span style=" margin:0px; padding:0px; border:none; color:black; Background-color:inherit ">{ </span> </li></li> <li class="alt" style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important"><li class="alt" style="border-style:none None None solid; border-left-width:3px; Border-left-color:rgb (108,226,108); List-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important "><span style=" margin:0px; padding:0px; border:none; color:black; Background-color:inherit "> <span class=" Comment " style=" margin:0px; padding:0px; border:none; Color:rgb (0,130,0); Background-color:inherit ">//...... </span> <span style=" margin:0px; padding:0px; border:none; Background-color:inherit "> </span> </span> </li></li> <li style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; background-color:rgb(248,248,248); line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important"><li style="border-style:none None None solid; border-left-width:3px; Border-left-color:rgb (108,226,108); List-style:decimal-leading-zero outside; Background-color:rgb (248,248,248); line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important "><span style=" margin:0px; padding:0px; border:none; color:black; Background-color:inherit "> <span class=" keyword " style=" margin:0px; padding:0px; border:none; Color:rgb (0,102,153); background-color:inherit; Font-weight:bold ">return </span> <span style=" margin:0px; padding:0px; border:none; background-color:inherit "> yes; </span> </span> </li></li> <li class="alt" style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important"><li class="alt" style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important"><span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit">}</span></li></li> </ol><p style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px"><p style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px"></p></p><p style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px"><p style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">"return YES" before adding the code:</p></p><p style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px"><p style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px"></p></p><strong><strong>[cpp]</strong></strong>View Plaincopy<br> <ol start="1" class="dp-cpp" style="padding:0px; border:none; list-style-position:initial; background-color:rgb(255,255,255); color:rgb(92,92,92); margin:0px 0px 1px 45px!important"> <li class="alt" style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important"><span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit"><span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit"> <span style="margin:0px; padding:0px; border:none; background-color:inherit">[[uinavigationbar appearance] setbackgroundimage:[uiimage imagenamed:@</span><span class="string" style="margin:0px; padding:0px; border:none; color:blue; background-color:inherit">"logo.png"</span><span style="margin:0px; padding:0px; border:none; background-color:inherit">] forbarmetrics:uibarmetricsdefault]; </span> <span class="comment" style="margin:0px; padding:0px; border:none; color:rgb(0,130,0); background-color:inherit">//this adds the image</span> <span style="margin:0px; padding:0px; border:none; background-color:inherit"> </span> </span></span></li> </ol><br style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px"><span style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px"><span style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">Success. </span></span><p style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px"><p style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px"></p></p><p style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px"><p style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px"><br></p></p><p style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px"><p style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">The height of the 1th step can be directly taken to the height of the picture, so it is more convenient.</p></p><p><p>iOS development changes the height and background picture of Uinavigationcontroller Uinavigationbar</p></p></span>