Samui
Samui

Reputation: 1384

Custom tableview cells similar to this

What is the best way to achieve this style in uitableview cells?

TableView

I need to know how to achieve that result. I've seen tutorials but nothing similar. Any help would be greatly appreciated.

Upvotes: 0

Views: 189

Answers (2)

Rahul Vyas
Rahul Vyas

Reputation: 28720

You can achieve this by creating a custom cell add shadows on UILabel's text and custom UISwitch. See apple's elements sample for faster performance they are using drawRect for drawing cell. Also you will find on google about gradient cell using drawRect. That should help you to achieve the result you are looking for.

Upvotes: 1

Oscar Gomez
Oscar Gomez

Reputation: 18488

The round up and grouping is part of the UITableView style gruped:

- (id)initWithFrame:myCGRect style:UITableViewStyleGrouped

The color is part of UITableViewCell background color, for the switches you would have to create those images and then add them as a subview of your UISwitch using:

//This method is inherited by UISwitch from UIView

[mySwitch addSubview:yourCustomView]

Upvotes: 0

Related Questions