UIAlertView not displaying complete message

我与影子孤独终老i 提交于 2019-11-29 05:13:00

There is a way.

When you present your alert, you can just implement this method:

- (void)willPresentAlertView:(UIAlertView *)alertView {
alertView.frame = CGRectMake(alertView.frame.origin.x, alertView.frame.origin.y -50
                             ,alertView.frame.size.width, 300);
}

Adjust the height to fit your need. It will look something like this:

If you need to move the button around, you can just add new lines (\n) to your message, and it will move the button down.

As mentioned by sudo rm -rf, UIAlertView has a limit.

You can try creating your own "alert" that doesn't clip by creating a view controller and showing it using presentModalViewController:animated:.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!