iOS: how to stop text animation in partial curl

半腔热情 提交于 2019-12-29 08:41:53

问题


I'm using a partial curl modal in my iOS application. Please see this video: http://vimeo.com/38643030

During the partial curl transition, the text in the round rect buttons is moving too. How can I stop this?


回答1:


Put [self.view layoutIfNeeded] in the -viewDidLoad implementation for the view controller that's being shown via the curl animation. This makes the buttons & their contents lay out once before the animation starts instead of trying to do its layout (and redo it as things change around it) during the animation.




回答2:


Just to add to rickster's answer, I had a similar problem with a UITableViewController and it was necessary to add

[self.view layoutIfNeeded];
[self.tableView layoutIfNeeded];

in the -viewDidLoad. Neither of the above statements worked on their own.



来源:https://stackoverflow.com/questions/9741052/ios-how-to-stop-text-animation-in-partial-curl

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!