8

I would like to 'bend' a view exactly like Flipboard app. I succeeded to flip an entire view, but not to bend it. My strategy is this: make a view/layer from half of the view I want to bend, add this to the view and flip this new view. So: how do I draw in a view/layer just half of another view?

Alex Tau
  • 2,579
  • 4
  • 24
  • 30

1 Answers1

16

Hey I recently used this code which works fine for me !!! You can get a flipboard like page animation with fold from center. It's concept is simple and it's easy to use. Just one class i.e .h .m file need to add in your project "AFKPageFliper".

https://github.com/mtabini/AFKPageFlipper

Hope this help for you too !!

Reefaq
  • 762
  • 12
  • 21
  • 1
    Very nice! Thanks a lot. This may be the best solution for this Flipboard - animation. – Alex Tau May 16 '11 at 14:43
  • @Reefaq: how did you manage to replace pdf with normal views (some view controllers' views). It is quite tricky, I couldn't make it work. – Alex Tau May 18 '11 at 13:40
  • 1
    @user: for displaying yours view just pass view which you want to show for particular page in MainController's viewForPage:inFlipper:. You can create your views in init method and store it in an NSArray then just fetch view's object from NSArray object in viewForPage:inFlipper: Note: i am working for a demo project on Flipboard like view in Ipad and will push the code in github. Have an eye on https://github.com/Reefaq – Reefaq May 18 '11 at 18:55
  • @Reefaq: I succeeded to put other view than pdf by following your example. But things don't happen right. For example: if I start to flip but then cancel the view underneath disappears in such a way that next time I flip the page I see only white view underneath. Maybe you could givme some useful advice on how to deal with this. Thanks again. – Alex Tau May 20 '11 at 10:13
  • 3
    @user: there is a fix in code .. please set viewToReturn.alpha = 1 for view which u are returning in viewForPage:inFlipper: – Reefaq May 20 '11 at 14:23
  • @Reefaq and other viewers. I discovered a bug I can't get rid off. If you try to flip the pages back and forward ver very fast it won't animate right. At one time it begins to animate chaotic. – Alex Tau May 24 '11 at 11:15
  • @user282045: yup there was some bug but i think its a nice & simple project to get started than any other (wat i search till date) !! Even most of the bugs are fixed by me & Nikhil (my colleague), will soon launch a opensource project in github under our account and https://github.com/raweng/ – Reefaq May 24 '11 at 19:54
  • 1
    @user282045:hey chk out our github project https://github.com/raweng/FlipView its like Flipboard app, u can get the fixed "AFKPageFliper" flip animation code from this link. – Reefaq Jul 20 '11 at 11:53
  • thanks a lot! i was just working on un update. so this comes in handy – Alex Tau Jul 20 '11 at 14:11
  • @Reefaq git hub link is not working. please provide as i am working on same flipclock image – Hiren Jan 20 '12 at 12:05
  • in above github code, there is no option for flipdown or fliptop – Pradeep Jun 19 '13 at 12:01
  • flipdown/flipup was introduced in Flipboard(iPhone) later after this post/library. So yes that is missing. – Reefaq Jun 20 '13 at 14:00