1

我刚刚实现了一个 UITableView 控制器,由于某种原因,刷新控件没有显示在顶部,我有什么问题吗?

分数通知页面

- (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;

}

主视图控制器

添加 ScoresNotificationsPage 与

[self.view addSubview:scoresNotificationsPage.view];
4

0 回答 0