I keep getting this error:
Bool cannot be used as a boolean; test for '!=nil' instead
I have looked at a couple of answers already online to this problem but i don't seem to understand how to fix this.
override func viewDidAppear(animated: Bool)
{
if(!PFUser.currentUser())
{
var loginAlert:UIAlertController = UIAlertController(title: "Please Sign up or Log In", message: "Publish your Quote Today", preferredStyle: UIAlertControllerStyle.Alert)
loginAlert.addTextFieldWithConfigurationHandler({
textfield in
textfield.placeholder = "Author or Publisher"
})
loginAlert.addTextFieldWithConfigurationHandler({
textfield in
textfield.placeholder = "Your Lock"
textfield.secureTextEntry = true
})
The error is highlighted on the second line.