Is there a way to design Tinder/Twitter-self-profile-like header effect with table view in iOS?

后端 未结 3 345
情书的邮戳
情书的邮戳 2021-01-03 12:49

I am trying to design something similar to what\'s seen on Tinder and Twitter own-profile view. There is a blurred background on Tinder behind user\'s own profile picture, a

3条回答
  •  时光说笑
    2021-01-03 13:25

    An easy way is putting two main objects on the view controller.One is UIViw,the other is UIScrollView(also UIScrollView subclass).You can put the UIView over the UIScrollView to mask the header part of the scrollview.Change the contenoffset of the scrollview(it's important especially when using the tableview, or the view will overlay the cell).The other thing is call the - (void)scrollviewdidscroll function.Do some math caculations in this function, mainly doing the parallax effect with scrollview.content.offset.y. This is an article introducing this—— IMPLEMENTING THE TWITTER IOS APP UI (UPDATE: SWIFT 3)

提交回复
热议问题