Remove SeparatorInset on iOS 8 UITableView for Xcode 6 iPhone Simulator

后端 未结 15 1995
情深已故
情深已故 2020-11-28 21:40

I found a weird white space on UITableView for iPhone 6 Simulator (iOS 8) on Xcode 6 GM. I have tried to set the SeparatorInset fr

15条回答
  •  感情败类
    2020-11-28 22:17

    Try to create a UITableViewCell class category and add this getter

    - (UIEdgeInsets)layoutMargins {
        return UIEdgeInsetsZero;
    }
    

    in iOS7 this will not be called cos there's no this property in SDK,and will not cause any crash; in iOS8 this will be called every time you use the cell

    It works for me

提交回复
热议问题