在ios8中使用
UIAlertController
当运行在ios7 下出现错误
dyld: Symbol not found: _OBJC_CLASS_$_UIAlertAction
解决办法:
第一步:
设置 General -> Linked Frameworks and Libraries
-> add UIKit.frameword (optional)
第二步:
if UIDevice.currentDevice().systemVersion.hasPrefix("8.")
来判断版本使用不同的代码
成功解决