ios 方法使用

时间:2014-07-01 20:10:11   收藏:0   阅读:347

注意导入头文件

类方法的使用

//文件名 UIColor+Expend.h   扩展方法
.h @interface UIColor (Expend) .m // UIColor+Expend.m #import "UIColor+Expend.h" #pragma mark - 颜色转换 IOS中十六进制的颜色转换为UIColor + (UIColor *) colorWithHexString: (NSString *)color

使用

self.view.backgroundColor=[UIColor  colorWithHexString:@"#EEE4D9"];

---------------------------------------------------

继承方法

//.h 文件
@interface UnderlineButton : UIButton
+ (UnderlineButton *) underlinedButton;

直接使用

  UnderlineButton   *lginBtn=[UnderlineButton  buttonWithType:UIButtonTypeCustom];

  

 

 

ios 方法使用,布布扣,bubuko.com

原文:http://www.cnblogs.com/hl666/p/3816940.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!