微信审核认证

1.首先进入这个平台
https://open.weixin.qq.com
2.创建应用 如果需要填Bundle id
Bundle id: com.optaim.tiantianyouyi
按提示步骤来即可

微信审核认证
文章图片
Snip20160721_1.png
3.审核通过后
微信审核认证
文章图片
Snip20160721_6.png import "IMJIETagView.h"
【微信审核认证】

@implementation IMJIETagView



-(id)initWithFrame微信审核认证
文章图片
CGRect)frame{



self = [super initWithFrame:frame];

if (self) {



selectedBtnList = [[NSMutableArray alloc] init];

self.clickBackgroundColor = [UIColor whiteColor];

self.clickTitleColor = TextColor;

self.clickArray = nil;

self.clickbool = YES;

self.borderSize = 0.5;

self.clickborderSize =0.5;

}

return self;

}



-(void)setTagsFrame微信审核认证
文章图片
IMJIETagFrame *)tagsFrame{



_tagsFrame = tagsFrame;

for (NSInteger i=0; i
UIButton *tagsBtn = [UIButton buttonWithType:UIButtonTypeCustom];

[tagsBtn setTitle:tagsFrame.tagsArray forState:UIControlStateNormal];

[tagsBtn setTitleColor:TextColor forState:UIControlStateNormal];

tagsBtn.titleLabel.font = TagTitleFont;

tagsBtn.tag = i;

tagsBtn.backgroundColor = [UIColor whiteColor];

[self makeCorner:self.borderSize view:tagsBtn color:UIColorRGBA(221, 221, 221, 1)];

tagsBtn.frame = CGRectFromString(tagsFrame.tagsFrames);

[tagsBtn addTarget:self action微信审核认证
文章图片
selector(TagsBtn微信审核认证
文章图片
forControlEvents:UIControlEventTouchDown];

tagsBtn.enabled = _clickbool;

[self addSubview:tagsBtn];

}



}



pragma mark 选中背景颜色
-(void)setClickBackgroundColor微信审核认证
文章图片
UIColor *)clickBackgroundColor{



if (_clickBackgroundColor != clickBackgroundColor) {

_clickBackgroundColor = clickBackgroundColor;

}

}



pragma makr 选中字体颜色
-(void)setClickTitleColor微信审核认证
文章图片
UIColor *)clickTitleColor{



if (_clickTitleColor != clickTitleColor) {

_clickTitleColor = clickTitleColor;

}

}



pragma makr 能否被选中
-(void)setClickbool微信审核认证
文章图片
BOOL)clickbool{



_clickbool = clickbool;



}



pragma makr 未选中边框大小
-(void)setBorderSize微信审核认证
文章图片
CGFloat)borderSize{



if (_borderSize!=borderSize) {

_borderSize = borderSize;

}

}



pragma makr 选中边框大小
-(void)setClickborderSize微信审核认证
文章图片
CGFloat)clickborderSize{



if (_clickborderSize!= clickborderSize) {

_clickborderSize = clickborderSize;

}

}



pragma makr 默认选择 单选
-(void)setClickString微信审核认证
文章图片
NSString *)clickString{



if (_clickString != clickString) {

_clickString = clickString;

}

if ([_tagsFrame.tagsArray containsObject:_clickString]) {



NSInteger index = [_tagsFrame.tagsArray indexOfObject:_clickString];

[self ClickString:index];

}

}



pragma mark 默认选择 多选
-(void)setClickArray微信审核认证
文章图片
NSArray *)clickArray{



if (_clickArray != clickArray) {

_clickArray = clickArray;

}



for (NSString *string in clickArray) {



if ([_tagsFrame.tagsArray containsObject:string]) {



NSInteger index = [_tagsFrame.tagsArray indexOfObject:string];

NSString *x = [[NSString alloc] initWithFormat微信审核认证
文章图片
"%ld",(long)index];

[self ClickArray:x];

}



}



}



pragma makr 单选
-(void)ClickString微信审核认证
文章图片
NSInteger )index{



UIButton *btn;

for (id obj in self.subviews) {

if ([obj isKindOfClass:[UIButton class]]) {

btn = (UIButton *)obj;

if (btn.tag == index){



btn.backgroundColor = [UIColor whiteColor];

[btn setTitleColor:_clickTitleColor forState:UIControlStateNormal];

[self makeCorner:_clickborderSize view:btn color:_clickTitleColor];

[_delegate IMJIETagView微信审核认证
文章图片
[[NSString stringWithFormat微信审核认证
文章图片
"%ld",(long)index]]];



}else{



btn.backgroundColor = [UIColor whiteColor];

[btn setTitleColor:TextColor forState:UIControlStateNormal];

[self makeCorner:_borderSize view:btn color:UIColorRGBA(221, 221, 221, 1)];



}

}

}

}





pragma mark 多选
-(void)ClickArray:(NSString *)index{



UIButton *btn;

for (id obj in self.subviews) {

if ([obj isKindOfClass:[UIButton class]]) {

btn = (UIButton *)obj;

if (btn.tag == [index integerValue]){



if ([selectedBtnList containsObject:index]) {



btn.backgroundColor = [UIColor whiteColor];

[btn setTitleColor:TextColor forState:UIControlStateNormal];

[self makeCorner:_borderSize view:btn color:UIColorRGBA(221, 221, 221, 1)];

[selectedBtnList removeObject:index];





}else{



btn.backgroundColor = [UIColor whiteColor];

[btn setTitleColor:_clickTitleColor forState:UIControlStateNormal];

[self makeCorner:_clickborderSize view:btn color:_clickTitleColor];

[selectedBtnList addObject:index];



}



[_delegate IMJIETagView:selectedBtnList];

}

}



}



}



-(void)makeCorner:(CGFloat)corner view:(UIView *)view color:(UIColor *)color{



CALayer * fileslayer = [view layer];

fileslayer.borderColor = [color CGColor];

fileslayer.borderWidth = corner;



}



-(void)TagsBtn:(UIButton *)sender{



if (self.clickStart == 0) {

//单选

[self ClickString:sender.tag];



}else{

//多选

NSString *x = [[NSString alloc] initWithFormat微信审核认证
文章图片
"%ld",(long)sender.tag];

[self ClickArray:x];

}

}



@end

    推荐阅读