How can I set a UITableView to grouped style
If i understand what you mean, you have to initialize your controller with that style. Something like:
myTVContoller = [[UITableViewController alloc] initWithStyle:UITableViewStyleGrouped];
Change UITableViewStyle to Plain programmatically in Swift?
I've resolved it with this code:
let datesTableView = UITableView(frame: CGRectZero, style: .Plain)
UITableView from storyboard - init with UITableViewStyleGrouped
Below is a screenshot showing you the option to set group but don't forget to select tableView in your storyboard.
How to change the style of a UITableViewController programmatically in Xcode
Not following? What do you mean by you don't have to "make a new table view"?? You still have to instantiate one.
Either you created one already and it has the style you want, or you have to instantiate a new one and set the property on it.
tableView.style is READONLY. So you can't change the style of an existing one. You are going to have to do something like:
[MyTableViewSubClass initWithFrame:aFrame style:UITableViewStyleGrouped];
How to create a grouped TableView without using a TableViewController
Setting the tableView's style
property to .Grouped
and return 2
from numberOfSections...
-method should yield a good result. Where does this standard approach fail?
Grouped style setting not taking effect from IB, UITableView
Still not sure why the "grouped" style setting is not taking effect from the Interface Builder. However, you can manually set it before the view is created here:
- (id)initWithStyle:(UITableViewStyle)style {
// Override initWithStyle: if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad.
style = UITableViewStyleGrouped;
if (self = [super initWithStyle:style]) {
}
return self;
}
Related Topics
Looping Through Nsattributedstring Attributes to Increase Font Size
Autolayout Link Two Uilabels to Have the Same Font Size
Xcode 6 Keeps Renaming My App's Directory in iOS8 Simulator After Each Run
Uitableview Inside Uiscrollview Not Receiving First Tap After Scrollling
Iphone:Daily Local Notifications
Handling Push Notifications When App Is Terminated
Convert an iOS Objective C Object to a JSON String
How to Get Image Metadata in iOS
Storyboard View Elements Greyed Out
Send Messages Between iOS and Watchos with Watchconnectivity in Watchos2
Test Whether a Uiview Is in the Middle of Animation
Gamecenter Authentication in Landscape-Only App Throws Uiapplicationinvalidinterfaceorientation