Welcome, Guest
Username Password: Remember me

Repositioning a Table View
(1 viewing) (1) Guest
  • Page:
  • 1
  • 2

TOPIC: Repositioning a Table View

Repositioning a Table View 1 year, 7 months ago #1

Hi, I have a basic navigation controller app and have added a UIImageView as a sub view and have positioned it below the navigation bar. I would like to move the table view so it visible and is not hidden behind the image.
  • doom
  • OFFLINE
  • Fresh Boarder
  • Posts: 13
  • Karma: 0

Re: Repositioning a Table View 1 year, 7 months ago #2

Hi Hayden,

You can position your UITableView anywhere you want in Interface Builder. I am assuming here you are using a UIViewController, as a UITableViewController does not allow you to do that.

Hope this helps.
  • tarekskr
  • OFFLINE
  • Administrator
  • Posts: 2402
  • Karma: 72

Re: Repositioning a Table View 1 year, 7 months ago #3

Can I still use sensible table view if I have a UITableView on a UIView as you said?
  • doom
  • OFFLINE
  • Fresh Boarder
  • Posts: 13
  • Karma: 0

Re: Repositioning a Table View 1 year, 7 months ago #4

Sure you can. Just create an IBOutlet to the UITableView on your view controller file (as you would normally do), then initialize the SCTableViewModel normally like this:

 
...
tableModel = [[SCTableViewModel alloc] initWithTableView:self.myTableView withViewController:self];
...
 


You can even have two (or more) UITableViews in your xib file and assign a different table view model to each!
  • tarekskr
  • OFFLINE
  • Administrator
  • Posts: 2402
  • Karma: 72
Last Edit: 1 year, 7 months ago by tarekskr.

Re: Repositioning a Table View 1 year, 7 months ago #5

Thanks tarek. I have added a UITableView and have linked it to an IBOutlet. But when I build and run I get this error. I'm not sue what step I am missing here.



*** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIViewController 0x5c4b240> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key myTableView.'
  • doom
  • OFFLINE
  • Fresh Boarder
  • Posts: 13
  • Karma: 0

Re: Repositioning a Table View 1 year, 7 months ago #6

Would you please post some code Hayden? Alternatively, you can just send your project to our support email and I'll be glad to tell you what's wrong.
  • tarekskr
  • OFFLINE
  • Administrator
  • Posts: 2402
  • Karma: 72
  • Page:
  • 1
  • 2
Time to create page: 0.89 seconds