UITableView transition when drilling down

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-25 04:47:15

问题


I saw this amazing transition in an app: when the user clicks on an item in the tableview and it "drills down" the transition is done "on top" of a background. That is the background image is static and just the actual tableview and whatever is presented after pressing something is moving (from right to left as usual).

How is this layered tableview transition done? Anyone knows?

(the app is "Munch-5-a-day" in the info-view)


回答1:


Endemic gives you the right direction. Another way can be view controllers with transparent background and then customize UIWindow.




回答2:


UINavigationController is a subclass of the standard UIViewController class, so it inherits the view property of UIViewController. I would imagine that the background image transition consists of two important steps:

  1. Assign a UIImageView containing the desired background image to the view property of the NavController
  2. Set self.view.backgroundColor = [UIColor clearColor] in each ViewController, most likely in the viewDidLoad method.

I'm currently unable to test this, but it should work.

Reference: UINavigationController Class Reference



来源:https://stackoverflow.com/questions/4291594/uitableview-transition-when-drilling-down

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