How to add subview inside UIAlertView for iOS 7?

前端 未结 6 2049
悲哀的现实
悲哀的现实 2020-11-27 15:41

I am having an application on iTunes store which displays some UILabel and UIWebView on UIAlertView. According to session video,

6条回答
  •  情歌与酒
    2020-11-27 15:49

    The custom alert view on github linked in the accepted answer is great. However, you cannot launch this directly from the viewdidload method. The enclosing UIView is attached to the app's first window, so you have to wait a split second. I added this code to viewdidload which I found as a closed issue.

    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 0.5f * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
          // Open the dialog here
       });
    

提交回复
热议问题