XHTwitterPaggingViewer icon indicating copy to clipboard operation
XHTwitterPaggingViewer copied to clipboard

UITableView goes under the navigation bar

Open Piero87 opened this issue 11 years ago • 7 comments

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?

Piero87 avatar Jul 16 '14 14:07 Piero87

@Piero87 I'm not sure you need.

Jack

xhzengAIB avatar Jul 18 '14 05:07 xhzengAIB

What you mean, how i can solve?

Piero87 avatar Jul 18 '14 06:07 Piero87

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

xhzengAIB avatar Jul 18 '14 09:07 xhzengAIB

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

Piero87 avatar Jul 18 '14 09:07 Piero87

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;

Piero87 avatar Jul 18 '14 15:07 Piero87

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

paulwcy avatar Aug 27 '14 05:08 paulwcy

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)

mnbayan avatar Mar 11 '15 08:03 mnbayan