看板 MacDev 關於我們 聯絡資訊
我原本 swift 1.2是這樣寫的 class ViewController : UIViewController{ var alertController : UIAlertController? } 但是到了2.0顯示 UIAlertController is only available on iOS 8.0 or newer XCode給我的提示是在class前面加上 @available(iOS 8.0, *) 有個疑問是這樣會不會導致整個class只有在8.0以後才看得到 第二個問題是有沒有其他方法可以改掉這邊的error 謝謝大家 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 118.163.221.141 ※ 文章網址: https://www.ptt.cc/bbs/MacDev/M.1442457709.A.B5C.html
densms: 是因為你專案設定 Deployment Target 設在 iOS 8 之前 09/17 10:47
fishead1116: 可是我Target必須設在7.1 09/17 10:50
densms: 應該這篇? http://goo.gl/U4T7aY 09/17 11:23
sdyy: UIAlertController本來就只能用在ios8.0以上吧 09/17 21:06
sdyy: 依照3F那篇就可 09/17 21:07
fishead1116: 因為我8以下用UIAlertView , 8.0以後用controller 09/18 08:10