Can I achieve the same as a following:
view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"imageName.png"]];
using IB only? Without need to write such a codeline? It seems that IB only allows to set up plain color, not images as background.
Interface Builder doesn't allow the use of a background pattern. However you could simply overlay the background with the appropriate image within an UIImageView. This would give the desired look to the application, without having to use the code you posted above.
However, I strongly disagree that you should use only Interface Builder. Code is a lot cleaner in my eyes and allows for a lot more control over what you build.
This cannot be done in IB, but got the code right. Despite what others have commented, use IB to the fullest extent possible, that way you can focus your efforts on the real business logic of your application, only customizing further where IB doesn't reach. Good luck!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With