Posts

Showing posts with the label objc

Built-in UITableViewCell's Styles (UITableViewCellStyle)

Image
UITableView has some built-in styles which can be use with in most scenario. You might want to look into these styles before starting to built a customize TableViewCell. There are 4 types of styles for the UITableViewCell , enum representation of this is UITableViewCellStyle . The details is as follow:   UITableViewCellStyleDefault , Default style with label on the left.    UITableViewCellStyleValue1 , Label on the left, and a blue label on the right.    UITableViewCellStyleValue2 , Blue label on the left side (right aligned text), label on the right side (left aligned text).    UITableViewCellStyleSubtitle , This is almost same with the Default style except that it has a grey smaller text under the label. It functions as the description / subtitles. To change the default style of a  UITableViewCell , replace the styles enum in initWithStyle with any of the enum mentioned above, simple as that. Example: // Obj...