Is there a way to make gradient background color in the interface builder?

前端 未结 9 1170
终归单人心
终归单人心 2021-01-30 13:08

For my application I\'m using a TableView and using customized UITableViewCells.

I customized my cells via interface builder, not programmatically. Is there a way to als

9条回答
  •  不知归路
    2021-01-30 13:46

    Yes this is possible : Make a image in gradient with 1 X Height pix. Set this to backgroundColor for cell.

    cell.backgroundColor =  [UIColor colorWithPatternImage:[UIImage imageNamed:@"gradImage.png"]];
    

    **You can set gradient color with code but its time taken process. If you fill better then search for that.

提交回复
热议问题