开发者

How did they do this? [iPhone layout]

开发者 https://www.devze.com 2023-02-06 06:15 出处:网络
checkout this app: If you swipe left in main image (the black shoes) you can see another image. Can anyone try this app (Fashiolista, it\'s free and signup isn\'t required) and

checkout this app:

How did they do this? [iPhone layout]

If you swipe left in main image (the black shoes) you can see another image.

Can anyone try this app (Fashiolista, it's free and signup isn't required) and say me ho开发者_C百科w can I do an effect like that?

Thank you guys.


I've not tried the app, but the way you usually accomplish that is with UIScrollView. In order to get the swiping-action to work as expected, you have to set pagingEnabled to YES.

The hardest part of implementing something like this is handling limited system resources: you'll run out of memory really quick. So you have to implement a queuing system rather like that used in UITableView. There are a few projects of this sort on GitHub, but I recommend checking out Apple's dev resources on this; I don't remember the link, but I believe in the last WWDC materials, they had info on how to build this properly.


They seem to be using Core Animation to modify the images' alpha and animate the images out and in.

Check out Introduction to Core Animation Programming Guide.

*edit:

They could also be using UIViews animation API. This is probably even simpler. View Programming Guide - Animations


Looks like they are lowering the opacity of the content as it scrolls of using core animation and ease out transition

0

精彩评论

暂无评论...
验证码 换一张
取 消