Shimmer Glow Animation Effect
Effect
Source
Https://github.com/facebook/Shimmer
Https://github.com/YouXianMing/Animations
////SHIMMERCONTROLLER.M//Animations////Created by youxianming on 15/12/18.//copyright©2015 year youxianming. All rights reserved.//#import "ShimmerController.h"#import "uiview+setrect.h"#import "FBShimmeringLayer.h"#import "FBShimmeringView.h"#import "StrokeCircleLayerConfigure.h"@interfaceShimmercontroller ()@end@implementationShimmercontroller- (void) Setup {[Super Setup]; Self.backgroundView.backgroundColor=[Uicolor Blackcolor]; {Fbshimmeringview*shimmeringview =[[Fbshimmeringview alloc] initWithFrame:self.contentView.bounds]; Shimmeringview.shimmering=YES; Shimmeringview.shimmeringbeginfadeduration=0.3; Shimmeringview.shimmeringopacity=0.3; [Self.contentview Addsubview:shimmeringview]; UILabel*logolabel =[[UILabel alloc] initWithFrame:shimmeringView.bounds]; Logolabel.text=@"Shimmer"; Logolabel.font= [Uifont fontwithname:@"Helveticaneue-ultralight"Size60.0]; Logolabel.textcolor=[Uicolor Whitecolor]; Logolabel.textalignment=Nstextalignmentcenter; Logolabel.backgroundcolor=[Uicolor Clearcolor]; Shimmeringview.contentview=Logolabel; } {Fbshimmeringlayer*shimmeringlayer =[Fbshimmeringlayer layer]; Shimmeringlayer.frame= (CGRect) {Cgpointzero, Cgsizemake (( the+1) *2, ( the+1) *2)}; Shimmeringlayer.position=Self.contentView.center; Shimmeringlayer.shimmering=YES; Shimmeringlayer.shimmeringbeginfadeduration=0.3; Shimmeringlayer.shimmeringopacity=0.3; Shimmeringlayer.shimmeringpauseduration=0.6f; [Self.contentView.layer Addsublayer:shimmeringlayer]; Cashapelayer*circleshape =[Cashapelayer layer]; Strokecirclelayerconfigure*config = [StrokecirclelayerconfigureNew]; Config.linewidth=1. F; Config.startangle=0; Config.endangle= M_pi *2; Config.radius= the. F; Config.strokecolor=[Uicolor Redcolor]; [Config Configcashapelayer:circleshape]; Shimmeringlayer.contentlayer=CircleShape; }}- (void) Buildtitleview {[Super Buildtitleview]; //Title label.UILabel *headlinelabel = [UILabelNew]; Headlinelabel.font= Font_avenir ( -. f); Headlinelabel.textalignment=Nstextalignmentcenter; Headlinelabel.textcolor=[Uicolor Redcolor]; Headlinelabel.text=Self.title; [Headlinelabel SizeToFit]; Headlinelabel.center=Self.titleView.middlePoint; Fbshimmeringview*shimmeringview =[[Fbshimmeringview alloc] initWithFrame:self.titleView.bounds]; Shimmeringview.shimmering=YES; Shimmeringview.shimmeringbeginfadeduration=0.3; Shimmeringview.shimmeringopacity=0.3; [Self.titleview Addsubview:shimmeringview]; Shimmeringview.contentview=Headlinelabel; //Line .UIView *line = [[UIView alloc] Initwithframe:cgrectmake (0,63.5, Self.view.width,0.5f)]; Line.backgroundcolor= [[Uicolor Graycolor] Colorwithalphacomponent:0.25f]; [Self.titleview Addsubview:line]; [Self.titleview Addsubview:headlinelabel]; //Back button.UIImage *image = [UIImage imagenamed:@"BackIconVer2"]; UIButton*backbutton = [[UIButton alloc] Initwithframe:cgrectmake (0,0, -, -)]; Backbutton.center= Cgpointmake ( -, Self.titleView.middleY); [Backbutton setimage:image Forstate:uicontrolstatenormal]; [Backbutton addtarget:self Action: @selector (Popself) forcontrolevents:uicontroleventtouchupinside]; [Backbutton.imageview Setcontentmode:uiviewcontentmodecenter]; [Self.titleview Addsubview:backbutton];}- (void) popself {[Self popviewcontrolleranimated:yes];}@end
Details
Shimmer Glow Animation Effect