CINBouncyButton 1.0.2

CINBouncyButton 1.0.2

测试已测试
Lang语言 Obj-CObjective C
许可证 MIT
Released最后发布2015年9月

Max Kramer维护。




  • Max Kramer

UIButton,但更具弹性和能够使用您自己的图标和属性文本。

以下是她行动中的视频,您可以在这里找到!链接

Screenshot of the button

安装

手动

将文件 CINBouncyButton.{h,m} 复制到您的项目中。

使用方法

导入头文件,实例化一个 CINBouncyButton 实例,将其添加为子视图,并惊叹于它的效果。

#import "CINBouncyButton.h"
@implementation XYZ
- (void)viewDidLoad {
    UIImage *buttonImage = [UIImage imageNamed:@"icon_twitter"];
    NSAttributedString *buttonTitle = [[NSAttributedString alloc] initWithString:@"Connect on Twitter!" attributes:@{NSForegroundColorAttributeName : [UIColor whiteColor]}];
    CINBouncyButton *twitterButton = [[CINBouncyButton alloc] initWithFrame:CGRectMake(40.0f, 40.0f, 250.0f, 40.0f) image:buttonImage andTitle:buttonTitle];
    [twitterButton setBackgroundColor:[UIColor blueColor]];
    [self.view addSubview:twitterButton];
    [super viewDidLoad];
}
@end

示例项目

在尝试构建和运行项目之前,请确保运行 pod install

粘土动图(请观看视频而非动画!)

Example