Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alert = [[UIAlertView alloc] initWithTitle: @"How to use buttons"
- message: @"line 1. line 2, line 3 "
- delegate: nil
- cancelButtonTitle: @"OK"
- otherButtonTitles: nil];
- UIAlertView *alert = [[UIAlertView alloc]
- initWithTitle: @"How to use buttons"
- message: [NSString stringWithFormat: @"%C line 1.n %C line 2,n %C line 3", (unichar) 0x2022, (unichar) 0x2022, (unichar) 0x2022];
- delegate: nil
- cancelButtonTitle:@"OK"
- otherButtonTitles:nil];
- NSArray *subViewArray = alertView.subviews;
- for(int x = 0; x < [subViewArray count]; x++){
- //If the current subview is a UILabel...
- if([[[subViewArray objectAtIndex:x] class] isSubclassOfClass:[UILabel class]]) {
- UILabel *label = [subViewArray objectAtIndex:x];
- label.textAlignment = NSTextAlignmentLeft;
- }
- }
- NSArray *subviewArray = alert.subviews;
- for(int x = 0; x < [subviewArray count]; x++){
- if([[[subviewArray objectAtIndex:x] class] isSubclassOfClass:[UILabel class]]) {
- UILabel *label = [subviewArray objectAtIndex:x];
- label.textAlignment = UITextAlignmentLeft;
- }
- alert.backgroundColor=[UIColor redColor];
- @"line 1.nline 2,nline 3"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement