forum

Home / DeveloperSection / Forums / TextAlign not working in UIAlertView?

TextAlign not working in UIAlertView?

Anonymous User167107-Aug-2015

I want to Aligned my message text in UIAlertView and here is my code but when i running this code the text appear as before and nothing change after for loop. i also want to increase my text? I am using this code Align text in a UIAlertView that has a scrollbar right now.

UIAlertView *alret = [[UIAlertView alloc] initWithTitle:[NSString stringWithFormat: @"%@",

[title objectAtIndex:indexPath.row]] message:

[NSString stringWithFormat:@"%@",

[description objectAtIndex:indexPath.row]] delegate:nil

cancelButtonTitle: @"OK" otherButtonTitles:nil];

for(id subview in alret.subviews) {

    if([subview isKindOfClass:[UITextView class]]) {

        [(UITextView *)subview setTextAlignment:NSTextAlignmentJustified];

    }

} [alret show];

 


Updated on 07-Aug-2015
I am a content writter !

Can you answer this question?


Answer

1 Answers

Liked By