IOS push is not fully exited when the interface is past
Workaround: Set Self.view.backgroundcolor
1. What is the initWithFrame method?
The initWithFrame method is used to initialize and return a new View object, based on the specified cgrect (size).
2. When do I use the initWithFrame method?
Simply put, we use the initWithFrame method to programmatically declare that the UIView object is created.
If you overload the initWithFrame method in a subclass, you must first call the initWithFrame method of the parent class. Initializes the custom UIView subclass.
Like what:
-(ID) initWithFrame: (CGRect) frame{
self = [Super initwithframe:frame];//First Call the initWithFrame method of the parent class
if (self) {
You can then customize the initialization of this class (the UIView subclass).
_scrollview = [[Uiscrollview alloc] initWithFrame:self.bounds];
[_scrollview setframe:cgrectmake (0, 0, 320, 480)];
_scrollview.contentsize = Cgsizemake (320*3, 480);
[Self addsubview:_scrollview];
}
return self;
}
-(BOOL) Respondstoselector:selector is used to determine whether there is a method named in a name (encapsulated in a selector object passed)
About the navigation bar, status bar, return button color
1. Configure the global navigation bar color
[[Uinavigationbar appearance]Setbartintcolor:zdcolor(52, 57, 69)
/: Note: The above zdcolor is declared in the PCH file:
Color
#define Zdcolor (R, G, b) [Uicolor colorwithred: (r)/255.0 Green: (g)/255.0 Blue: (b)/255.0 alpha:1.0]
2. Set the color of the return arrow and the right button in the Global navigation bar
[[Uinavigationbar appearance]settintcolor: [Uicolor Whitecolor]];
3. Set the title font color of the global navigation bar
Nsshadow *shadow = [[Nsshadow alloc] init];
Shadow.shadowcolor = [Uicolor colorwithred:0 green:0 blue:0 alpha:0.8];
Shadow.shadowoffset = Cgsizemake (0, 1);
[[Uinavigationbar appearance] settitletextattributes: [Nsdictionary Dictionarywithobjectsandkeys:[uicolor colorwithred:246 green:245 blue:245 alpha:1], Nsforegroundcolorattributename, Shadow, Nsshadowattributename, [UIFont fontwithname:@ "Helveticaneue-condensedblack" size:18], Nsfontattributename, nil]];
Note: This step is not required after you have declared the previous step.
4. comment out the font in the return arrow
Add a method to each controller:
-(void) hidewords{
[[Uibarbuttonitem appearance] Setbackbuttontitlepositionadjustment:uioffsetmake (0,-60)
Forbarmetrics:uibarmetricsdefault];
}
5. set the global status bar to white
1>. Plist inside, create a new view controller-based status bar appearance, set to No. Then set the inside Appdelegate:
2.UIApplication setting the style of the status bar
[UIApplication sharedapplication].statusbarstyle = uistatusbarstylelightcontent;
(There is a problem here, if you set a no effect, set it in a child controller, as follows:
Show status bar
[UIApplication Sharedapplication].statusbarhidden=no;
)
IOS push is not fully exited when the interface is past