Apparently a UIColor is not necessarily a single color, but can be a pattern as well. Confusingly, this is not supported in Interface Builder.
Instead you set the backgroundColor of the view (say, in -viewDidLoad) with the convenience method +colorWithPatternImage: and pass it a UI Image. For Instance:
- (void)viewDidLoad { [super viewDidLoad]; self.view.backgroundColor = [UIColor colorWithPatternImage: [UIImage imageNamed:@"gingham.png"]]; }Of course, don’t forget to add the image file to your application bundle.
via Repeating background image in native iPhone app – Stack Overflow.
Applying animation while resizing or moving the view
Animation can be applied while its frame, bounds, center, transform, alpha… is being changed. The key is set start and end values between beginAnimations and commitAnimations, so called animation block.
[UIView beginAnimations:nil context:nil];
[UIView setAnimationCurve: UIViewAnimationCurveEaseInOut];
[UIView setAnimationDuration: 1.0];
// set original position
[view setFrame:CGRectMake(0, 0, 100, 100)];
// move and grow
[view setFrame:CGRectMake(100, 100, 200, 200)];
[UIView commitAnimations];
Create alert dialog
UIAlertView takes care of this
UIAlertView *alert = [[UIAlertView alloc]
initWithTitle:@"Alert View"
message:@"Here is an alert message"
delegate:nil
cancelButtonTitle:@"Cancel"
otherButtonTitles:@"OK", nil];
[alert show];
// Since alert object is allocated above, it must be released here
[alert release];