iOS 7.1 UITableView添加footerView 後 最後一行分割線沒法顯示

今天用故事版 遇到個奇怪的問題:ios

我要用 tbView(tableView)展現寫信息。最後一行我要顯示些文案什麼的。考慮用 footerView ,開心coding ..,show下spa

哪裏有些不對吧,我最後行分割線呢。。。(上面能夠看到我用了scrView,實際上是同樣的 跟用footerView,都會出現這種問題)。可是 你上下滑動tabview 那個該死的分割線神奇的出現了。0.0...這是bug 吧。ios 7的,ios 6沒問題。3d

通過查找,果真有粗暴方法:code

重些你 cell  的blog

layoutSubviews方法io

- (void)layoutSubviews {
    [super layoutSubviews];
    
    for (UIView *subview in self.contentView.superview.subviews) {
        if ([NSStringFromClass(subview.class) hasSuffix:@"SeparatorView"]) {
            subview.hidden = NO;
        }
    }
}

尼瑪,直接刨cell 的祖墳。把那個SeparatorView 都重置爲 顯示。在顯示:table

哈,解決。雖然有點粗暴。class

相關文章
相關標籤/搜索