美文网首页iOS Developer
Shimmer FaceBook 闪光效果

Shimmer FaceBook 闪光效果

作者: Bryan5137 | 来源:发表于2016-08-04 16:31 被阅读92次

    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;
    
    3.效果图
    Paste_Image.png

    相关文章

      网友评论

        本文标题:Shimmer FaceBook 闪光效果

        本文链接:https://www.haomeiwen.com/subject/ivncsttx.html