MMPulseView

加入收藏
已有 6 人收藏

介绍:
    一款脉冲效果的集合,pulseView 提供了不同的属性( duration、count、lineWidth 来创建不同的脉冲展示效果)

    安装:支持cocoapods

    podfile 增加一行 pod 'MMPulseView' 然后运行 pod install.

    如果想导入最后的可执行版本,podfile可以增加以下一行:pod 'MMPulseView', :head

    

    使用方法:

    pulseView.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];

    pulseView.colors = @[(__bridge id)[UIColor whiteColor].CGColor,

     (__bridge id)[UIColor blackColor].CGColor,

     (__bridge id)[UIColor whiteColor].CGColor];

    pulseView.locations = @[@(0.3),@(0.5),@(0.7)];

    pulseView.startPoint = CGPointMake(0, 0.5);

    pulseView.endPoint = CGPointMake(1, 0.5);

    

    pulseView.minRadius = 0;

    pulseView.maxRadius = 100;

    

    pulseView.duration = 3;

    pulseView.count = 6;

    pulseView.lineWidth = 3.0f;

    

    [pulseView startAnimation];

测试环境:
  [Code4App]编译测试
效果图:
  • iOS / iPhone / iPad 一款脉冲效果的集合,pulseView 提供了不同的属性( duration、count、lineWidth 来创建不同的脉冲展示效果)<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;安装:支持cocoapods<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;podfile 增加一行 pod 'MMPulseView' 然后运行 pod install. <br /><br />&nbsp;&nbsp;&nbsp;&nbsp;如果想导入最后的可执行版本,podfile可以增加以下一行:pod 'MMPulseView', :head<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;使用方法:<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;pulseView.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;pulseView.colors = @[(__bridge id)[UIColor whiteColor].CGColor,<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;                     (__bridge id)[UIColor blackColor].CGColor,<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;                     (__bridge id)[UIColor whiteColor].CGColor];<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;pulseView.locations = @[@(0.3),@(0.5),@(0.7)];<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;pulseView.startPoint = CGPointMake(0, 0.5);<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;pulseView.endPoint = CGPointMake(1, 0.5);<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;pulseView.minRadius = 0;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;pulseView.maxRadius = 100;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;pulseView.duration = 3;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;pulseView.count = 6;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;pulseView.lineWidth = 3.0f;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;[pulseView startAnimation];
代码评论:
登录后方可评论

  
  • 暂无评论