Select Demo on the iOS 3D effect page

Source: Internet
Author: User

The home page of the project needs a 3D effect. You can refer to this Demo. What about this example? I got one from the Internet, but I don't know. It's amazing that the people who wrote the Demo can do it easily. It's amazing, I watched it for an hour. It is easy to understand here, at least I think it is easy to understand.

 

In the Framework class example.

ViewController. h

 

#import 
 
  #import FlowCoverView.h@interface ViewController : UIViewController
  
   @property (strong , nonatomic) FlowCoverView* m_FlowCoverView;@end
  
 

ViewController. m

 

 

// Obtain the screen height # define ScreenHeight [[UIScreen mainScreen] bounds]. size. height // obtain the screen width # define ScreenWidth [[UIScreen mainScreen] bounds]. size. width # import ViewController. h @ interface ViewController () @ end @ implementation ViewController-(void) viewDidLoad {[super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. self. m_FlowCoverView = [[FlowCoverView alloc] initWithFrame: CGRectMake (0, 0, ScreenWidth, ScreenHeight)]; self. m_FlowCoverView.delegate = self; [self. view addSubview: self. m_FlowCoverView];}-(int) flowCoverNumberImages :( FlowCoverView *) view {return 6;}-(UIImage *) flowCover :( FlowCoverView *) view cover :( int) image {switch (image % 6) {case 0: default: return [UIImage imageNamed: @changmen.jpg]; case 1: return [UIImage imageNamed: @changmen.jpg]; case 2: return [UIImage imageNamed: @changmen.jpg]; case 3: return [UIImage imageNamed: @changmen.jpg]; case 4: return [UIImage imageNamed: @changmen.jpg]; case 5: return [UIImage imageNamed: @ changmen.jpg] ;}}- (void) flowCover :( FlowCoverView *) view didSelect :( int) image {NSLog (@ Selected Index % d, image );}


 

 

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.