Recreating iOS 7 Calendar UIView Animation

2019-04-07 23:10发布

Everybody knows the brand-new awesome animation inside iOS 7 Calendar app. You can see them in this short video: http://vimeo.com/69247779

I would recreating something like that creating a "modal" rectangle that appear when the user taps on a UIButton. When the user taps on this button the app should move an UIView (actually inside an UITableViewCell) and move it within this rectangle, BUT the original UIView should stay in the same place. It needs to duplicate itself, something alike.

I've created a simple image explaining the concept.

enter image description here

How to implement something like this?

2条回答
Melony?
2楼-- · 2019-04-07 23:28

i might suggest you to create another UIView. Do not add it to the main view yet.

now on the view that you're currently working on,

[UIView transitionWithView: self.view duration: 0.5 options: UIViewAnimationOptionsCurveEaseOut animations:^{
[self.view addSubView:createdView]; } completion:nil];

Hope this works, if you haven't already implemented. I'm a beginner, excuse me if there's any mistake.

查看更多
贪生不怕死
3楼-- · 2019-04-07 23:45

I assume we're looking for something similar :-) How to display datepicker like that in iOS 7 calendar UIDatePicker , apologies if its not. @bobnoble has pointed to exact solution. I'm trying to achieve it but I'm new to iOS so bit stuck. Found another link with sample code :-) iOS 7 - How to display a date picker in place in a table view?

查看更多
登录 后发表回答