Shimmer FaceBook 闪光效果
2016-08-04 本文已影响92人
Bryan5137
FaceBook 闪光Label 库 Shimmer
1.CocoaPods导入:pod 'Shimmer'
2.使用
#import <FBShimmeringView.h>
FBShimmeringView* shimmeringView = [[FBShimmeringView alloc] init];
shimmeringView.center = CGPointMake([UIScreen mainScreen].bounds.size.width/2, 100);
shimmeringView.bounds = CGRectMake(0, 0, 300, 30);
[self.view addSubview:shimmeringView];
UILabel* loadingLabel =[[UILabel alloc] init];
loadingLabel.frame = shimmeringView.frame;
loadingLabel.backgroundColor = [UIColor blueColor];
loadingLabel.textAlignment = NSTextAlignmentCenter;
loadingLabel.text = @">>>>>>Shimmer";
shimmeringView.contentView = loadingLabel;
shimmeringView.shimmering = YES;