开发者

How to prevent UIAlertView from word wrapping

i have an Alert view, i have put a text开发者_JS百科 in the message property,

message:@" my Text is .... ?";

when the alert view is shown, i have my text shown in one line and the "?" shown in other line, how can i show all my message Text in one line ?? thanks for your answer


I think that your text is probably too long to fit on one line.

You could force word wrap by removing the space between your text and the question mark?

message:@" my Text is ....?";


Try this code , as i tested it and message was shown in single line

UIAlertView *alerrt = [[UIAlertView alloc]initWithTitle:@"test" message:@" my Text is .... ?" delegate:nil cancelButtonTitle:@"ok" otherButtonTitles:nil];
[alerrt show];
[alerrt release];


If you want to control the behavior of UIAlertView, I suggest to sub-class UIWindow and implement one custom alertView by self.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜