UITableViewController刷新控件没有显示

时间:2013-08-07 23:49:36

标签: uiviewcontroller uitableview

我刚刚实现了一个UITableView控制器,由于某种原因,刷新控件没有显示在顶部是否有一些我错了?

ScoresNotificationsPage

- (id)initWithFrame:(CGRect)frame {
    self = [self initWithStyle:UITableViewStylePlain];

    self.view.backgroundColor = [UIColor whiteColor];

    self.view.frame = frame;

    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];

    UIRefreshControl *refreshControl = [[UIRefreshControl alloc] init];

    refreshControl.tintColor = [UIColor redColor];

    // Assign the refresh control to the table view controllers refresh property.

    [refreshControl addTarget:self action:@selector(changeSorting) forControlEvents:UIControlEventValueChanged];
    self.refreshControl = refreshControl;

}

MainViewController

使用

添加ScoresNotificationsPage
[self.view addSubview:scoresNotificationsPage.view];

0 个答案:

没有答案