1. Timers
[Nstimer SchEduledtimerwithtimeinterval: How long does it change onceTarget: Who's timer selector: @selector (method name) UserInfo: Timer information repeats: repeat]
, which represents a change every 1 seconds, to set the timer, call the following Timerac, described as empty, repeating 2. Notice[[Nsnotificationcenter Defaultcenter]postnotificationname:@ "Notificationsname "object: Notification Creator UserInfo: User Information]
after the notification is published, to have the recipient, the recipient receives the notification, the corresponding method actionreceive notifications and remember to remove notifications when you have done so in the main function -(ibaction) Notice: (ID) Sender {//method dragged out of xib
Uitabbarcontroller *taabar = Self.viewcontroller.Tabbarcontroller;
//Implement the interface jumpto jump to the page[Taabar setSelectedIndex:3];
Notifies the interaction of the implementation message
[[NsnotificationcenterDefaultcenter]Postnotificationname: @ "Enternotice" object:nil];
//Receive notifications in the corresponding interface[[Nsnotificationcenter Defaultcenter]Addobserver: Selfselector: @selector (Enternotice:)name: @ "Enternotice" object:nil];
//Select which page in the interface to enter-(void)Enternotice:(Nsnotification *) Noti {
Seg.Seletedindex= 1;
}
//Implement the interface jumpto jump to the page[Self.viewController.tabBarController setselectedindex:1];
[[Nsnotificationcenter Defaultcenter] Postnotificationname:@ "Enterticket"Object:nil UserInfo:@{@ "index": @ "0"}];//userinfo: Details of the contents of the notification carry @{key:index value: where to jump}
Information interaction notification method in iOS pass value