In Xcode, how do you set the background of a UIButton as an image? Or, how can you set a background gradient in the UIButton?
UIButton
This will work
UIImage *buttonImage = [UIImage imageNamed:@"imageName.png"]; [btn setImage:buttonImage forState:UIControlStateNormal]; [self.view addSubview:btn];