The style should be like iBooks or pictures in foursquare. When we flip to the left we see the next picture being pulled. How to do so? Is there a code to do so? I think there must have been a ready code for that
相关问题
- Image loads in simulator but not device?
- Unable to change UISearchBar cancel button title c
- CollectionView with background Image
- UIModalTransitionStyleFlipHorizontal flips Vertica
- Begin UIPanGesture Event From A Pressed State At T
相关文章
- Why are my UIView layer properties not being set w
- create UIImageView
- How to show the keyboard for a UIView
- UIView subclass draws background despite completel
- Rotate (angle) a UIView, using User Defined Runtim
- iOS showing Image from ALAsset in UITableView
- Adding UICollectionView inside UIView without Stor
- How to smoothen the edges of a UIImageView in iOs
It sounds like you want
UIPageViewController
.How to Create a Page Curl Effect in Iphone or ipad http://www.allappsdevelopers.com/TopicDetail.aspx?TopicID=d22b3f08-ff78-4b69-b144-41989bdf9807
Try this. One solution. Revise as needed.
Create a new project of type Single View Application, name it BookEffect, uncheck Use Storyboards, uncheck Include Unit Tests, but be sure to check the option Use Automatic Reference Counting.
Then add to the project a few pictures, for example, in JPEG format.
Create a new file - use the Objective-C Class template with a subclass of UIViewController, select the option With XIB for user interface, and name it SinglePageViewController. Save the file inside the BookEffect folder.
Once added, select the SinglePageViewController.xib and add to the view a UILabel control and UIImageView control and make the appropriate connections to the File's Owner.
Revise the SinglePageViewController.h to look like this:
In SinglePageViewController.m add:
and add these definitions of methods:
Now go to the BookEffecViewController.h, and make it look like this:
In BookEffectViewController.m revise viewDidLoad to look like this:
Define two more methods in BookEffectViewController.m:
That's it. Command-R to test it with the iPad Simulator This is a basic shell and other bells and whistles can be added for your own pleasure, i.e. take out Page Number, add a caption, etc.
Hope this helped.