iOS Pulltorefresh using animated GIF or image array or Vector image

Source: Internet
Author: User

Tell me about those amazing pull-down effects.

1. Animation drop-down, here to borrow GitHub resources

Advantages: Directly with the GIF image processing, the drop-down progress in full accordance with the GIF graph running time, as long as the time and pull-down progress matching can be, the effect is smooth

Https://dribbble.com/shots/1418440-Twisted-gif?list=searches&tag=animated_gif&offset=3

There are a lot of GIF resources available for download reference

Project Address: Https://github.com/uzysjung/UzysAnimatedGifPullToRefresh

2. Vector image Processing

Project Reference Address: Https://github.com/nicolastinkl/TKRefereshTableHeaderView

Advantages: GPU rendering, the effect is conceivable. It is troublesome to adjust the vector diagram when using

3. The most common circle progress is filled with such effects

This is relatively simple. Can be achieved directly through Uiview-drawrect

//Only override Drawrect:if perform custom drawing.//An empty implementation adversely affects performance during animation.- (void) DrawRect: (cgrect) rect{//Drawing CodeCgcontextref context =Uigraphicsgetcurrentcontext (); Cgcontextsetlinewidth (Context,1.0);    Cgcontextsetlinecap (context, kcglinecapround); Cgcontextsetstrokecolorwithcolor (context, [Uicolor Redcolor].    Cgcolor); CGFloat startangle=-m_pi/3; CGFloat Step= One*m_pi/6*self.progress; Cgcontextaddarc (context, Self.bounds.size.width/2, self.bounds.size.height/2, self.bounds.size.width/2-3, StartAngle, Startangle+step,0); Cgcontextstrokepath (context);}
View Code

GitHub Address: https://github.com/phaibin/EGOTableViewPullRefresh/blob/master/Demo/TableViewPull/Classes/View/ refreshtableheaderview/circleview.m

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.