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

Here’s what you need to know about food shelf life

One minute with the doctor, the postures are cons...

Qualities of a Project Leader

Many projects have several types of Leaders: 1. G...

How to write advertising copy? 50 classic movie lines, 50 examples!

For a crazy movie collector sometimes "One l...

Break the 24-hour unspoken rule and create truly innovative apps

Some people describe the past 2014 as a good era ...

How to increase the landing page conversion rate from 13% to 30%?

I have read some articles about how to improve th...

New energy vehicles: Let cars break up with gasoline?

As an important means of production and transport...

Apple's high-profile launch of smartwatch is a blessing in disguise for Samsung

Industry analysts believe that Apple Watch is act...

What to do after catching a polar bear?

Written by Su Chengyu Jon Aars is a biologist spe...