Welcome, Guest
Username Password: Remember me

Using Sensible Tables in iPad Split View
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: Using Sensible Tables in iPad Split View

Using Sensible Tables in iPad Split View 1 year, 8 months ago #1

I am trying to use Sensible Tables to manage the table in a generic iPad Split View project. It seems to be working fine except I can't figure out how to make the UITableViewStyle into Grouped. The app template gives a UINavigation Controller containing a RootViewController which is a subclass of UITableView. It's not clear where this is instantiated, which would be the point to define it as grouped. Any ideas on this would be greatly appreciated.
  • ulfie22
  • OFFLINE
  • Fresh Boarder
  • Posts: 9
  • Karma: 0

Re: Using Sensible Tables in iPad Split View 1 year, 8 months ago #2

Problem Solved. I just added a UITableView on top of the existing view in Interface Builder, configured it as Grouped, and did a little re-wiring. Looks and works great. Thanks!
  • ulfie22
  • OFFLINE
  • Fresh Boarder
  • Posts: 9
  • Karma: 0

Re: Using Sensible Tables in iPad Split View 1 year, 8 months ago #3

Glad you figured it out

One important thing to note about Sensible TableView is that it's completely de-coupled from both your view controller and your UITableView. What this means is that you can use it with any of your own view controllers, or with any UITableView that you create programmatically or in interface builder, fully setting it up the way you like (a good example was the grouped style you wanted to modify).

Good luck!
  • tarekskr
  • OFFLINE
  • Administrator
  • Posts: 2402
  • Karma: 72

Re: Using Sensible Tables in iPad Split View 1 year, 8 months ago #4

Thanks for your comment.

Let's say I didn't want to use IB to create a grouped table, could I have done it in some way using SCTableViewController or SCTableViewModel? I didn't see a property I could latch onto to change this.

Thanks
  • ulfie22
  • OFFLINE
  • Fresh Boarder
  • Posts: 9
  • Karma: 0

Re: Using Sensible Tables in iPad Split View 1 year, 8 months ago #5

In Sensible TableView you're actually responsible for creating the UITableView (either programmatically or in Interface Builder) and then passing it on to SCTableViewModel in the constructor. If you're creating a UITableView programmatically, you would normally write this code to have its style as grouped:

 
UITableView *myTableView = [UITableView initWithFrame:myFrame style:UITableViewStyleGrouped];
 
  • tarekskr
  • OFFLINE
  • Administrator
  • Posts: 2402
  • Karma: 72

Re: Using Sensible Tables in iPad Split View 1 year, 8 months ago #6

Makes perfect sense - pretty much exactly what I did in IB.

Thanks for a great product!
  • ulfie22
  • OFFLINE
  • Fresh Boarder
  • Posts: 9
  • Karma: 0
  • Page:
  • 1
Time to create page: 0.88 seconds