Advertise here




Advertise here

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Google Sign In with OpenID
Please do not post the same thing multiple times. The board software automatically flags certain posts as needing moderator attention. This happens the most often for new users. I'm pretty sure this is made clear at the time you attempt to post. Posting the same thing over and over again just makes that many more posts the moderators have to weed through later. This makes us sad. Don't make us sad. If your post/thread doesn't appear, just wait a while. Don't post it again. If it hasn't shown up by the next day, then you can try again. I normally go through posts in the mornings, and try to check a few times throughout the day, but I'm not here 24/7. There will typically be a significant delay before posts are approved. Just be patient.

Right way to set up UITableView inside a UIView

MaxnerMaxner Posts: 50Registered Users
This is just to make sure that I did it right. So i have the UIView which is the view of Files Owner, and inside the UIView i have a small UITableView. Since Files owner is a subclass of UIViewController i cant use File Owner as data source (the app will crash). So what i do is add a UITableViewController to the .xib and set the class to the UITableView Subclass class file. Then i connect data source with the TableViewController and delegate with files owner, then everything works, but is it the right way to do it?
Post edited by Maxner on
Check out my first App: Canada Taxes & Tip Calculator

Replies

  • shadowfaxshadowfax Posts: 8New Users
    I'm a bit uncertain of what you're trying to do, or the steps you describe (A screenshot would be useful)... or maybe it's because I'm still a newbie to X-Code.

    However, why would the app crash? If you implement the protocols and the delegate correctly there should be no problem. I've got a UIView subclass (Not even UIViewController) handling a UIPickerView and a UIToolbar inside it (All in one class).

    However, why don't you use a UITableViewController?

    Usually a UITableView that doesn't reach the edges of the screen doesn't show up nicelly. Usually when someone ask for this kind of layout it is because there is something at the top or at the bottom of the list. If that is the case, I guess it would be best to use the tableHeaderView or tableHeaderView.

    Best regards
  • MaxnerMaxner Posts: 50Registered Users
    shadowfax;358129 said:
    I'm a bit uncertain of what you're trying to do, or the steps you describe (A screenshot would be useful)... or maybe it's because I'm still a newbie to X-Code.

    However, why would the app crash? If you implement the protocols and the delegate correctly there should be no problem. I've got a UIView subclass (Not even UIViewController) handling a UIPickerView and a UIToolbar inside it (All in one class).

    However, why don't you use a UITableViewController?

    Usually a UITableView that doesn't reach the edges of the screen doesn't show up nicelly. Usually when someone ask for this kind of layout it is because there is something at the top or at the bottom of the list. If that is the case, I guess it would be best to use the tableHeaderView or tableHeaderView.

    Best regards
    I can't use a TabelViewController as said before, but the table goes till the edges apart from the bottom, where i have other stuff, the app isn't crashing, i just wanted to clarify things and know if im doing it right.
    Check out my first App: Canada Taxes & Tip Calculator
  • BrianSlickBrianSlick Posts: 9,316Tutorial Authors, Registered Users
Sign In or Register to comment.