1

I wanted to show a Settings view, so I figured I could use the pageCurl modal style. I have a UIViewController that I am presenting 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 curls, to reveal my UITableViewController below, the cells subviews (labels and accessory views) seem to animate into position, which looks horrible:

enter image description here enter image description here enter image description here

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

Ideas?

4

2 回答 2

0

如果autoResizingMask将 tableView 的属性设置为UIViewAutoresizingNone,我认为这不会发生。这可能是页面卷曲动画中的一个小错误。

于 2011-11-29T23:28:59.240 回答
0

我注意到这个奇怪动画的方向(也发生在 UIButtons 上)取决于在对象的属性检查器的控制部分中选择的对齐方式(在界面生成器中)。我整个晚上都在修补所有属性,但还没有找到解决方案。:(

编辑:所以,我认为三个UIButton(和一个UIPickerView)同时在做这种奇怪的行为。我创建了一个链接到其中一个的属性UIButtons。然后,在viewDidLoad这个视图的控制器中,我添加了以下行:

_firstAffectedButton.titleLabel.autoresizingMask = UIViewAutoresizingNone;

这为我解决了所有按钮和选择器的问题!:? 很奇怪,对吧?

谁能解释为什么这是有效的?我觉得我正在做一些愚蠢的事情来解决这个问题,但我看不出它是什么。

编辑2:原来有一个更好和更清洁的解决方案来解决这个问题。看到这个帖子

于 2012-02-04T16:55:05.587 回答