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