_headView=[[HeadRefreshView alloc]initWithScrollView:_tableView pullText:@"下拉->獲取新數據" refreshingText:@"J先生正在努力加載..."]; _headView.teardropType=TeardropTypeHead; _headView.block=^(HeadRefreshView * head) { [head performSelector:@selector(endRefresh) withObject:nil afterDelay:3 inModes:[NSArray arrayWithObject:NSRunLoopCommonModes]]; }; [_tableView addSubview:_headView];
activityIndicator=[[WYActivityIndicatorView alloc]initWithFrame:self.view.bounds];
// 是否顯示中間的中止按鈕 [activityIndicator mayStop:NO];
// 是否開啓動畫 [activityIndicator startAnimating]; activityIndicator.textLabel.text=[NSString stringWithFormat:@"J先生->第%i行->loading...",row]; activityIndicator.textLabel.textAlignment=NSTextAlignmentCenter; activityIndicator.stopButtonClickBlock=^(WYActivityIndicatorView *activityIndicatorView) { [activityIndicatorView stopAnimating]; };