UITableView moves down after moving from the next page

I have a table with frame size (0, 65, 320, 503). When I go to another page, I go back. Before navigate to another page

After navigate back from nextpage

+4
source share
6 answers

add the following line to your method - (void) viewDidLoad.

self.automaticallyAdjustsScrollViewInsets = NO;

hope it fixes your problem.

+3
source

Hope you found a solution that worked for you. This happened to me when using AutoLayout and UITableViews in combination with the awesome SWRevealViewController class. In short, I spent a lot of time and eventually found this answer that worked for me:

fooobar.com/questions/81818 / ...

UITableView ( UMP UML ), , .

+2

,

if ([self respondsToSelector:@selector(edgesForExtendedLayout)])
{
    self.edgesForExtendedLayout = UIRectEdgeNone;
}
[self.navigationController.navigationBar setTranslucent:NO];

.

, ...

0

, tableview viewWillAppear, - , viewwillappear.

0

viewWillAppear

[your_tableview removeFromSuperview];
[your_tableview setTranslatesAutoresizingMaskIntoConstraints:YES];
your_tableview.frame = CGRectMake(0, 65, 320, 503);
[self.view addSubview:your_tableview];

,

your_tableview.tableHeaderView = nil;
0

.

1> set the transparency property of the navigation bar to NO. Adjust the subtitle frame again, because after setting NO, the preview will adjust some new frames.

2> In viewDidLoad set the following

self.automaticallyAdjustsScrollViewInsets = NO;

3> done.

0
source

Source: https://habr.com/ru/post/1568843/


All Articles