Instagram-style scroll view source code download

Instagram-style scroll view source code download

Other

iOS

iOS

Object-C

Xcode

3.64MB

Source code introduction:

A scrolling effect similar to Instagram and 20lines.

Source code running screenshot:

Source code snippet

  1. -( void )loadGraphics {
  2. imgCropped=nil; self.view.backgroundColor=[UIColor whiteColor];
  3. //set the image of the template  
  4. if (kHeight>480){ imageViewTemplate=[[PFImageView alloc] initWithFrame:CGRectMake(kWidth/2-85, 20, 170, 255)];
  5. } else { imageViewTemplate=[[PFImageView alloc] initWithFrame:CGRectMake(kWidth/2-60, 20, 120, 180)];
  6. } [imageViewTemplate setImage:[UIImage imageNamed:@ "copertina1" ]];
  7. [self.view addSubview:imageViewTemplate];
  8. //set the templates view at the bottom  
  9. templatesView=[[PFTemplatesViewController alloc] init]; templatesView.view.frame=CGRectMake(0, kHeight-264, kWidth, 264);
  10. templatesView.imgCover=_imgChosen; [templatesView loadGraphics];
  11. templatesView.scrollTemplatesView.delegate=self; [self.view addSubview:templatesView.view];
  12. templateNumber=0;
  13. templateColor=rgb2Color(255, 255, 255); }
  14. -( void )templateCreated:(UIImage *)imgTemplate andNumber:(NSInteger)numberTemplate andColor:(UIColor *)colorTemplate
  15. { templateNumber=numberTemplate;
  16. templateColor=colorTemplate;
  17. [imageViewTemplate setImage:imgTemplate]; CATransition *transition = [CATransition animation];
  18. transition.duration = 0.3f; transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
  19. transition.type = kCATransitionFade; [imageViewTemplate.layer addAnimation:transition forKey:nil];
  20. }

Source code download address: http://down..com/data/1963010

<<:  Frameworks and tools that hybrid app developers must not miss

>>:  Android Tianying Leyue web reader source code download

Recommend

Zhihu Blue Ocean: A Guide to Mining 20 Million Traffic Opportunities

According to my incomplete statistics of local da...

250 essential terms in advertising and marketing

In advertising companies (especially internationa...

Content operation: 3 nodes of content distribution!

Nodes attract users to aggregate and become the g...

Marketing promotion program skills and planning methodology

I have heard many of my friends and colleagues ta...

Brother Nan: The Theory of Cause and Effect Followed by Successful People

Resource introduction of Nan Ge’s “The Theory of C...

Top 10 Brand Creative Case Studies in 2021

As the final chapter of the year-end review, this...

How to choose event promotion channels and quickly launch events?

New media operation, channel selection, and maxim...

How powerful are the legendary space-based weapons? You'd never guess!

RODS FROM GOD, the legendary ultimate weapon, can...