KieranLafferty / KLNoteViewController

A view controller that organizes multiple navigation controllers in a stack inspired by Evernote 5.0 app
Other
923 stars 147 forks source link

UITableView height problem #12

Closed dexcell closed 11 years ago

dexcell commented 11 years ago

Hello, Thanks for the great UI.

I have a problem a bit here. So here is my condition right now:

I have a ViewController subclassed from UITableViewController and added to KLNoteViewControllers viewControllers

This UITableView has custom row with height equals 100, and have around 20 items, so there is scrollbar show up.

The problem is the last item, is 'cut off', probably because of UITableView does not honor UINavigationBar height and calculate correctly.

But if i try using 'normal way' to add it to UINavigationBar, the UITableView Height does respond correctly.

    // Normal way add to UINavigationController, UITableView in CafeViewController height does calculate correctly
    CafeViewController *cafeViewController = [[CafeViewController alloc] init];
    UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:cafeViewController];
    self.window.rootViewController = navController;

I hope you understand what i mean.

I don't know if it's a bug or not. Thank you

KieranLafferty commented 11 years ago

Try putting this in a nav controller that is not using the control. For example, set the root view of your app to have this view controller in a navigation controller and see if the same behaviour is observed. If so, then it is likely an issue with the view controller. Otherwise, if it does not mess up the size, it is likely something to do with how the controller handles the childViewControllers

dexcell commented 11 years ago

Yes, i tried without using KLNoteViewController, and using normal UINavigationBar and it works correctly.

I believe you can easily reproduce the problem by creating UITableViewController from the XCode template and then fill the table with 20 items or so until the scrollbar show up, and then return the created UITableViewController in viewControllerForRowAtIndexPath KLNoteViewControllers delegate.

Any ideas for me to solve this? Or should i use UIViewController and create the table programatically instead of relying on UITableViewController generated from template? (Sorry for the noob question, i am still quite new in this ios world)

Thank you

dexcell commented 11 years ago

I wonder if no ones here experiencing the issue, since what i done was pretty basic