1. Interface Switching value(1) Use button to switch interface
When the page jumps, the system automatically calls, Segue connection
-(void) Prepareforsegue: (Uistoryboardsegue *) Segue Sender: (ID) Sender {}
Segue.sourceviewcontroller Existing interface
Segue.destinationviewcontroller Arrival Interface
Segue.identifier Connection Identifier
Top view of the Nav.topviewcontroller stack (get the properties of the next interface)
The story version of Show mode depends on the previous interface property if Uinavigationcontroller is the stack outbound method, or the modal view if other
(2) The code jumps to the other controller and switches the interface according to the identifier.
[Self performseguewithidentifier:@ "navgition" sender:sender];
2. Custom Tabbar
-(void) Tabbar: (Tabbar *) Tabbar Selectedatindex: (dockitemtype) Type {
Self.selectedindex = type;
}
3, UIApplication
Single-instance mode gets the Application object
uiapplication * application = [uiapplication sharedapplication];
Get Appdelegate Object
Appdelegate * appdelegate = Application.delegate; (methods that can be called in appdelegate)
Setting the display and hiding of indicators for network connections
application.networkactivityindicatorvisible = YES;
Create a notification
uiusernotificationsettings * Notifi = [Uiusernotificationsettings Settingsfortypes:uiusernotificationtypebadge Categories:nil];
Registering Notifications for Apps
[Application Registerusernotificationsettings:notifi];
Set the icon corner mark (the red circle on the top right of the software)
Application.applicationiconbadgenumber = 10;
Http:ftp:https://safiri
SMS://Send SMS
Tel://Call
mailto://e-Mail
Be sure to test the real machine
Nsurl * url = [Nsurl urlwithstring:@ "Mailto://[email protected]"];
[[UIApplication sharedapplication] openurl:url];
Previous methods of IOS7
When using it, set the info.plist so that the view controller-based status bar appearance to No
[[UIApplication sharedapplication] setstatusbarhidden:no];
[[UIApplication sharedapplication] setstatusbarstyle:uistatusbarstylelightcontent];
IOS7 set the status bar after the hidden set in the VC settings
-(BOOL) Prefersstatusbarhidden {
return NO;
}
-(Uistatusbarstyle) Preferredstatusbarstyle {
return uistatusbarstylelightcontent;
}
4, UIWindow
Three ways to get UIWindow
UIWindow * Window1 = Appdelegate.window;
UIWindow * Window2 = [[UIApplication sharedapplication] Keywindow];
UIWindow * window3 = Self.view.window;
Switch interface (try not to use it)
Window3.rootviewcontroller = [[Secondviewcontroller alloc] init];
iOS section other knowledge