iOS 7 UITableView: is it a bug or is it me?

后端 未结 4 884
故里飘歌
故里飘歌 2021-02-14 14:35

Please see the attached image. In table views in iOS 7, UIKit draws a thin gray vertical line between the accessory view and the reordering control. However, when the table view

4条回答
  •  感动是毒
    2021-02-14 15:05

    This works for Swift 2.1. on iOS 9.2.1. in XCode 7.2.: I tested the code on iPhone 6s, while on 4" devices the separator does not appear.

    I have made a subclass of UITableViewCell

    Inside of required init(coder aDecoder: NSCoder) I have done this:

    required init(coder aDecoder: NSCoder)
    {
        super.init(coder: aDecoder)!
        self.textLabel?.backgroundColor = UIColor.clearColor()
    }
    

    You might find the need to set the background color in override func drawRect(rect: CGRect) {} since this solution applies only to a cell create by Interface builder.

    The solution works on dev and simulator.

提交回复
热议问题