UITableView에 UIActivityIndicatorView 나타내기.

강의자료/iPhone | 2011.07.05 17:50 Share |

UIActivityIndicatorView *indicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
indicator.hidesWhenStopped = YES; // 끝나면 사라지도록...
[self.tableView addSubview:indicator];
indicator.center = self.tableView.center; // indicator를 화면 중앙에 표시하기.
[indicator setBackgroundColor:[UIColor whiteColor]]; // inidicator의 배경색상 지정(기본값은 투명).

[indicator startAnimating];
// to do...
[indicator stopAnimating];
[indicator release];
.....This article is posted by whitesnake.
1 ··· 17 18 19 20 21 22 23 24 25 ··· 176