the paper folding/unfolding effect in twitter for iPad
Here's a really simple example using a gesture recognizer and CATransform3D
to get you started. Simply pinch to rotate the gray view.
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// ...
CGRect rect = self.window.bounds;
view = [[UIView alloc] initWithFrame:CGRectMake(rect.size.width/4, rect.size.height/4,
rect.size.width/2, rect.size.height/2)];
view.backgroundColor = [UIColor lightGrayColor];
[self.window addSubview:view];
CATransform3D transform = CATransform3DIdentity;
transform.m34 = -1/500.0; // this allows perspective
self.window.layer.sublayerTransform = transform;
UIPinchGestureRecognizer *rec = [[UIPinchGestureRecognizer alloc] initWithTarget:self
action:@selector(pinch:)];
[self.window addGestureRecognizer:rec];
[rec release];
return YES;
}
- (void)pinch:(UIPinchGestureRecognizer *)rec
{
CATransform3D t = CATransform3DIdentity;
t = CATransform3DTranslate(t, 0, -self.view.bounds.size.height/2, 0);
t = CATransform3DRotate(t, rec.scale * M_PI, 1, 0, 0);
t = CATransform3DTranslate(t, 0, -self.view.bounds.size.height/2, 0);
self.view.layer.transform = t;
}
iOS Paper fold (origami / accordion) effect animation, with manual control
I write another library for folding transition : https://github.com/geraldhuard/YFoldView
Hope it works for you.
Animation on the IPad - What to use for something like the Alice in Wonderland Book?
A popular framework is cocos-2d for iOS which you can use to build something like the Alice book.
iPad - How to move Mulitple UIViews side-by-side
You should take a look at the UIScrollView with paging enabled.
Make all your views and put them next to one another inside a UIScrollView. i.e.
// Get your views
MyView *v1 = [[[MyView alloc] initWithFrame:CGRectMake(0, 0, 320, 480)] autorelease];
MyView *v2 = [[[MyView alloc] initWithFrame:CGRectMake(320, 0, 320, 480)] autorelease];
MyView *v3 = [[[MyView alloc] initWithFrame:CGRectMake(640, 0, 320, 480)] autorelease];
// Make the UIScrollView
UIScrollView *scroll = [[[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, 320, 480)] autorelease];
[scroll setPagingEnabled:YES];
[[scroll addSubview:v1];
[[scroll addSubview:v2];
[[scroll addSubview:v3];
[scroll setContentSize:CGSizeMake(960, 480)];
// add the scroll view to your view
[[self view] addSubview:scroll];
Now, the three views (v1, v2 and v3) are next to each other in a scroll view whose content is much wider the view. With paging enabled, they will scroll left and right but won't stop halfway through a view.
3D Door Open Animation between two UIViewControllers
You have to apply a little trick to get 3D to work:
CATransform3D _3Dt = CATransform3DIdentity;
_3Dt.m34 = 1.0 / -1000;
This creates perspective transform. 1000 represents the distance from the viewer to the objects (you can experiment with this value to get a smooth look).
Related Topics
Cllocationmanager Delegate Methods Are Not Getting Called(Google Maps Is Integrated)
Launch Screen Storyboard Not Displaying Image
iOS 8 - Screen Blank After Dismissing View Controller with Custom Presentation
Auto Layout to Dynamically Size Uilabel Width
Allow Unverified Ssl Certificates in Wkwebview
Number of Threads Created by Gcd
Uitableview Backgroundcolor Always White on iPad
How to Import Private Framework Headers in a Swift Framework
Facebook Logout Is Not Working in New Sdk V.4.1.0 in iOS
Why I Couldn't Assign Fetched Values from Firestore to an Array in Swift
Swift: Declare an Empty Dictionary
How to Ask User for Camera Access After They Have Already Denied It on iOS
How to Build .Ipa for React Native
Invalid Update: Invalid Number of Items on Uicollectionview
Which Tasks Are More Suitable to Nsoperation Than Gcd
How to Set-Up in App Purchase Free Trial Period in iOS App
How to Expand Uicollectionview Contentsize When Paging Enable