项目介绍:
最简单的聊天界面,只需要导入一个类,即可使用。
主要使用方法如下:
[Objective-C] 查看源文件 复制代码
#import "UIView+CateGory.h"
#import "constant.h"
@implementation UIView (CateGory)
-(UITextField *)initWithField:(CGRect)rect color:(UIColor *)color
{
UITextField *field=[[UITextField alloc]initWithFrame:rect];
field.backgroundColor = color;
field.layer.cornerRadius = 4.25f;
field.layer.borderColor = [[UIColor whiteColor] CGColor];
field.layer.borderWidth = 0.5f;
[self addSubview:field];
return field;
}
-(UIButton *)initWithBtn:(CGRect)rect title:(NSString *)title titleColor:(UIColor *)textColor
{
UIButton *button=[UIButton buttonWithType:UIButtonTypeCustom];
button.frame=rect;
[button setTitle:title forState:UIControlStateNormal];
[button setTitleColor:textColor forState:UIControlStateNormal];
button.backgroundColor=[UIColor lightGrayColor];
[self addSubview:button];
return button;
}
@end

ChatView.zip
(94.22 KB, 下载次数: 136, 售价: 5 金钱)
2016-7-14 17:39 上传
点击文件名下载附件
soft chat
