UIButton->UIControl->UIView->UIResponder->NSObject//继承关系
系统样式:
UIButton * btn=[UIButtonbuttonWithType:UIButtonTypeCustom];
btn.frame=CGRectMake(100, 100, 100, 100);
[btn setTitle:@"文字"forState:UIControlStateNormal];
[btn setTitleColor:[UIColor blueColor]forState:UIControlStateHighlighted];
btn.titleLabel.font=[UIFontsystemFontOfSize:22];//字体
[btn setTitleShadowColor:[UIColor redColor]forState:UIControlStateHighlighted];//阴影高亮
btn.currentTitle;//拿到当前标题
btn.currentTitleColor;//拿到标题颜色
btn.currentTitleShadowColor;//阴影颜色
自定义样式:
UIButton *button=[UIButton buttonWithType:UIButtonTypeCustom];
but