![]() ĬAGradientLayer *gradientBottom = įrame = CGRectMake(0, 0, _.width - 20, _.height / 2) The width will be -20 so the gradient will not overflowĬGRect frame = CGRectMake(0, 0, _.width - 20, _.height / 2) Make a frame for the layer based on the size of the cells contentView Start with making an outlet to this cell: (strong, nonatomic) IBOutlet UITableViewCell *cellDelete Ĭreate a method in which the cell will be formatted: - (void)formatCellDeleteĬAGradientLayer *gradientTop = The second will cover the lower half.Īdd QuartzCore to your implementation file: #import The first will cover the upper half of the cell. What we will do is add two GradientLayers to the cell. Give the cell a red background color (f.e. Make one of the sections have only a single cell. ![]() In the below example I will use assume a UITableView with grouped, static cells, designed in storyboard. I would like to contribute a solution which does not use images but which gives the same look as the 'delete' button in Contacts.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |