iOS第三方框架使用牛叉的demo

工作常用样式UIButton封装

2016-09-10  本文已影响156人  郑州程序员王一

文章底部有源码Demo

CGRect frame = CGRectMake(WYScreenW * 0.5 - 60 * 0.5, 100, 60, 80);
self.testBtn = [[WYButton alloc]initWithFrame:frame bigImageName:@"publish-video" buttonTitle:@"段子" FontSize:15];
self.testBtn.titleLabel.font = [UIFont boldSystemFontOfSize:15.0];
[self.view addSubview:self.testBtn];
CGRect frame = CGRectMake(WYScreenW * 0.5 - 60 * 0.5, 200, 60, 60);
self.testBtn = [[WYButton alloc]initWithFrame:frame mediumImageName:@"publish-video" buttonTitle:@"我的爱好" FontSize:13];
self.testBtn.titleLabel.font = [UIFont boldSystemFontOfSize:13.0];
[self.view addSubview:self.testBtn];
CGRect frame1 = CGRectMake(maginStart, 300, 60, 60);
WYButton *testBtn1 = [[WYButton alloc]initWithFrame:frame1 buttonTitle:@"发布" backgroundImage:@"releaseBtn" FontSize:13 ImageName:@"release" AlignMode:wy_imageLeftTitleRight];
[self.view addSubview:testBtn1];

Demo下载:WYButton下载

勤学如早春之苗,不见其增,日有所涨。
辍学如磨刀之石,不见其减,日有所损。

上一篇下一篇

猜你喜欢

热点阅读