How can I set a UITableView to grouped style

You can do the following:

UITableView *myTable = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStyleGrouped];

Swift 3:

let tableView = UITableView.init(frame: CGRect.zero, style: .grouped)

Leave a Comment