- (UIButton *)_createToolbarButton { UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom]; btn.exclusiveTouch = YES; btn.size = CGSizeMake(kScreenWidth / _emoticonGroups.count, kToolbarHeight); btn.titleLabel.font = [UIFont systemFontOfSize:14]; [btn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; [btn setTitleColor:UIColorHex(5D5C5A) forState:UIControlStateSelected]; UIImage *img; img = [YHExPRessionHelper imageNamed:@"compose_emotion_table_left_normal"]; img = [img resizableImageWithCapInsets:UIEdgeInsetsMake(0, 0, 0, img.size.width - 1) resizingMode:UIImageResizingModeStretch]; [btn setBackgroundImage:img forState:UIControlStateNormal]; img = [YHExpressionHelper imageNamed:@"compose_emotion_table_left_selected"]; img = [img resizableImageWithCapInsets:UIEdgeInsetsMake(0, 0, 0, img.size.width - 1) resizingMode:UIImageResizingModeStretch]; [btn setBackgroundImage:img forState:UIControlStateSelected]; [btn addTarget:self action:@selector(_toolbarBtnDidTapped:) forControlEvents:UIControlEventTouchUpInside]; return btn;}
新闻热点
疑难解答