IOS: using modal page Flip makes weird animation of cells in UITableViewController

I wanted to show the Settings view, so I decided that I could use the page style mod. I have a UIViewController that I present from:

 Settings *settings = [[[Settings alloc] initWithStyle:UITableViewStyleGrouped] autorelease]; settings.view.backgroundColor = [UIColor scrollViewTexturedBackgroundColor]; settings.modalTransitionStyle = UIModalTransitionStylePartialCurl; settings.modalPresentationStyle = UIModalPresentationFullScreen; [self presentModalViewController:settings animated:YES]; 

When the page cells subviews to show below the UITableViewController , the cells subviews (labels and accessory views) appear animated in a position that looks awful:

enter image description hereenter image description hereenter image description here

The strange thing is that animation never happens with the top cell in a section. This does not happen with other modalTransitionStyle's , so I wonder why this could happen. This is really frustrating because I cannot figure out how to stop it.

Ideas?

+1
source share
2 answers

If you set the autoResizingMask tableView autoResizingMask to UIViewAutoresizingNone , I think this will not happen. This may be a small mistake in the page curl animation.

0
source

I noticed that the direction of this strange animation (which also happens with UIButtons) depends on the alignment selected in the "Control" section of the Attributes object inspector (in Interface Builder). All evening I worked on all the attributes and until I found a solution. :(

Edit : so, I had three UIButton in my view (and one UIPickerView ) where this strange behavior was running at the same time. I created a property related to ONE from UIButtons . Then, in the viewDidLoad this view controller, I added the following line:

 _firstAffectedButton.titleLabel.autoresizingMask = UIViewAutoresizingNone; 

And this is fixed for me, for all buttons and the collector!:? Strange, right?

Can someone explain why this works? I feel like I'm doing something stupid to fix it, but I don’t understand what it is.

Change 2 . It turns out there was a better and cleaner solution to this problem. See this post .

0
source

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


All Articles