NSMutableDictionary * infoDictionary = @{
@“123”:@“123”,
@“1233”:@“1233”
};
[NSTimer scheduledTimerWithTimeInterval:1
target:self
selector:@selector(theTimer:)
userInfo:infoDictionary
repeats:yes];
- (void)theTimer:(NSTimer *)timer
{
NSLog(@"-信息是:%@", [timer userInfo] );
}
如上则实现了信息传递,即传递参数,可以是单个也可以是多个。