Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UITableView goes under the navigation bar #1

Open
Piero87 opened this issue Jul 16, 2014 · 7 comments
Open

UITableView goes under the navigation bar #1

Piero87 opened this issue Jul 16, 2014 · 7 comments

Comments

@Piero87
Copy link

Piero87 commented Jul 16, 2014

Hello, i have tried your project and i have substitute the:

XHTableViewController *tableViewController = [[XHTableViewController alloc] init];

with a simple UITableViewController with xib, but the UITableview go under the UINavigationBar and the first two line are covered by the navigation bar. how i can do?

@xhzengAIB
Copy link
Owner

@Piero87
I'm not sure you need.

Jack

@Piero87
Copy link
Author

Piero87 commented Jul 18, 2014

What you mean, how i can solve?

@xhzengAIB
Copy link
Owner

你的意思你用xib初始化对吗?

@Piero87
Copy link
Author

Piero87 commented Jul 18, 2014

Yes i do it with xib inizialization...the uitableviewcontroller

@Piero87
Copy link
Author

Piero87 commented Jul 18, 2014

this is an example:

NSMutableArray *viewControllers = [[NSMutableArray alloc] initWithCapacity:7];

NSArray *titles = @[@"Home", @"Friend", @"曾宪华", @"News", @"Viewer", @"Framework", @"Pagging"];

[titles enumerateObjectsUsingBlock:^(NSString *title, NSUInteger idx, BOOL *stop) {
    TableViewController *tbv = [[TableViewController alloc] initWithNibName:@"TableViewController" bundle:nil];
    tbv.title = title;
    [viewControllers addObject:tbv];
}];

twitterPaggingViewer.viewControllers = viewControllers;

@paulwcy
Copy link

paulwcy commented Aug 27, 2014

Same with UICollectionViewController...
The view does extend to the edges (under the top navigation bar), but scroll view is not adjusted. Works fine for UITableViewController

@mnbayan
Copy link

mnbayan commented Mar 11, 2015

I have encountered this issue, as a work arround, set the content inset of your tableview/collectionview

tableView.contentInset = UIEdgeInsets(top: 0, left: 0, bottom: 150, right: 0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants