- (void)viewDidLoad
{
[super viewDidLoad];
[NSTimer scheduledTimerWithTimeInterval:0.5 target:self selector:@selector(connect:) userInfo:nil repeats:YES];
}
- (void)connect:(NSTimer *)sender
{
NSLog(@"...");
switch (self.cnt) {
case 0:
self.title = @"连接中";
break;
case 1:
self.title = @"连接中.";
break;
case 2:
self.title = @"连接中..";
break;
case 3:
self.title = @"连接中...";
break;
}
self.cnt ++;
self.cnt %= 4;
}