首页 > 代码库 > iOS 按钮设置

iOS 按钮设置

设置按钮为不可按:setEnable

[button setEnable:NO];

设置变灰:setAlpha

[button setAlpha:0.4];

设置按钮图像:setImage

[button setImage:[UIImage imageNamed:@"choice"] forState:UIControlStateNormal];

设置按钮标题:setTitle

[button setTitle:@"按钮"];

判断按钮是否透明:isTransparent

[button isTransparent];

设置按钮是否透明:setTransparent

//透明

[button setTransparent:YES];

//不透明

[button setTransparent:NO];

判断边框是否显示边框:showsBorderOnlyWhileMouseInside

[button showsBorderOnlyWhileMouseInside];

设置边框是否显示边框:setShowsBorderOnlyWhileMouseInside
//显示

[button setShowsBorderOnlyWhileMouseInside:YES];

//不显示

[button setShowsBorderOnlyWhileMouseInside:NO];

设置按钮的显示类型:setButtonType:

待续。。。

iOS 按钮设置