My xcode project was working fine. I was working on XML and Json parsing. After some time , I found out that Im getting these errors on all the successful projects.
LaunchOptionsKey' is not a member type of 'UIApplication'
'normal' is unavailable: use [] to construct an empty option set
Is my xcode corrupted?
//AppDelegate
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
return true
}
//Button Pressed
@IBAction func buttonPressed(_ sender: Any) {
let title = (sender as AnyObject).title(for:.normal)
var plainText : String?
if title != nil {
plainText = title! + " button pressed"
}
label.text = plainText
print(plainText ?? "no text available")
}