相关疑难解决方法(0)

UIRefreshControl首次运行时标题偏移不正确,有时标题丢失

第一次启动UIRefreshControl时文本被错误地反映...稍后有时刷新文本根本没有出现,只有刺状是可见的

我不认为我对iOS6有这个问题...可能与iOS7有关

在UITableViewController中作为子项添加到VC中,它驻留在一个模态呈现的UINavigationController中

- (void)viewDidLoad {

    [super viewDidLoad];

    [self setRefreshControlText:@"Getting registration data"];
    [self.refreshControl beginRefreshing];
}

- (void)setRefreshControlText:(NSString *)text {

    UIFont * font = [UIFont fontWithName:@"Helvetica-Light" size:10.0];
    NSDictionary *attributes = @{NSFontAttributeName:font, NSForegroundColorAttributeName : [UIColor blackColor]};
    self.refreshControl.attributedTitle = [[NSAttributedString alloc] initWithString:text attributes:attributes];

}
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

在此输入图像描述

cocoa-touch uitableview uirefreshcontrol ios7

29
推荐指数
1
解决办法
9969
查看次数

标签 统计

cocoa-touch ×1

ios7 ×1

uirefreshcontrol ×1

uitableview ×1