I’m trying to cusotmize UITableViewCell through UIAppearance in the same way I implemented a custom UINavigationBar (ruby motion syntax):
bg = UIImage.imageNamed("cell_bg.png").resizableImageWithCapInsets(UIEdgeInsetsMake(0,13,0,13))
UITableViewCell.appearance.setBackgroundImage(bg, forState:UIControlStateNormal, barMetrics:UIBarMetricsDefault)
but setBackgroundImage isn’t defined, nor is setBackgroundView nor setBackgroundViewImage… UITableViewCell conforms to UIAppearanceContainer and so shouldn’t I be able to use one of these?
thanks
Conforming to UIAppearanceContainer doesn’t mean that you can set the appearance of anything you like, it just means that it will offer an appearance proxy. There aren’t any built-in UIAppearance methods for UITableViewCell as far as I know.
For your needs, try creating a UIImageView with your stretchable image, and setting it as the
backgroundViewof the cell.