/**
下拉刷新数据
*/
- (
void
)_initTabViewCtrl
{ /** 创见下拉刷新控件 */ _fresh = [[ UIRefreshControl alloc ] init ]; _fresh . attributedTitle = [[ NSAttributedString alloc ] initWithString : @" 刷新 " ]; _fresh . tintColor = [ UIColor redColor ]; [ _fresh addTarget : self action : @selector (freshAction:) forControlEvents : UIControlEventValueChanged ]; /** 赋值给表视图控制器 */ self . refreshControl = _fresh ; } - ( void )freshAction:( UIRefreshControl *)fresh { [ _fresh performSelector : @selector (endRefreshing) withObject : nil afterDelay : 3 ];
}
|