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

Why were dogs domesticated?

Recently I saw an interesting topic: If dogs rule...

iOS 13.5.5 code suggests Apple is developing a service package

According to foreign media reports, there are rum...

A complete set of activity operation planning and promotion ideas

The product is like a singer, and the operation i...

Ye Maozhong's Marketing Strategy Notes

1. Tribute to Mr. Ye Maozhong There is one thing ...