草庐IT

redButton

全部标签

iphone - 如何在 iphone 中以编程方式实现带有背景图像的按钮

我正在iPhone中以编程方式使用按钮开发图像。现在我想为下一个和上一个按钮添加按钮背景图像。我想以编程方式为这些按钮添加图像。如何在iphone中添加按钮图片。 最佳答案 //像这样添加按钮UIImage*redButtonImage=[UIImageimageNamed:@"ExitButton.png"];UIButton*redButton=[UIButtonbuttonWithType:UIButtonTypeCustom];redButton.frame=CGRectMake(280.0,10.0,29.0,29.0);

iphone - 如何在 iphone 中以编程方式实现带有背景图像的按钮

我正在iPhone中以编程方式使用按钮开发图像。现在我想为下一个和上一个按钮添加按钮背景图像。我想以编程方式为这些按钮添加图像。如何在iphone中添加按钮图片。 最佳答案 //像这样添加按钮UIImage*redButtonImage=[UIImageimageNamed:@"ExitButton.png"];UIButton*redButton=[UIButtonbuttonWithType:UIButtonTypeCustom];redButton.frame=CGRectMake(280.0,10.0,29.0,29.0);