首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > 移动开发 >

在ViewDidLoad中设立按钮图案

2012-09-07 
在ViewDidLoad中设置按钮图案- (void)viewDidLoad{UIImage *buttonImageNormal [UIImage imageNamed:@w

在ViewDidLoad中设置按钮图案

- (void)viewDidLoad{    UIImage *buttonImageNormal = [UIImage imageNamed:@"whiteButton.png"];    UIImage *stretchableButtonImageNormal = [buttonImageNormal        stretchableImageWithLeftCapWidth:12        topCapHeight:0];    [doSomethingButton setBackgroundImage:stretchableButtonImageNormal        forState:UIControlStateNormal];    UIImage *buttonImagePressed = [UIImage imageNamed:@"blueButton.png"];    UIImage *stretchableButtonImagePressed = [buttonImagePressed        stretchableImageWithLeftCapWidth:12        topCapHeight:0];    [doSomethingButton setBackgroundImage:stretchableButtonImagePressed        forState:UIControlStateHighlighted];}

?

热点排行