pmusolino / PMAlertController

PMAlertController is a great and customizable alert that can substitute UIAlertController
MIT License
2.52k stars 187 forks source link

Use of unresolved identifier 'PMAlertController' #25

Closed l1k2j3h4g5 closed 8 years ago

l1k2j3h4g5 commented 8 years ago

I dragged the /Library folder to the Project Navigation.

Then added this code:

   let alertVC = PMAlertController(title: "A Title", description: "My Description", image: UIImage(named: "img.png"), style: .Alert)

    alertVC.addAction(PMAlertAction(title: "Cancel", style: .Cancel, action: { () -> Void in
        print("Capture action Cancel")
    }))

    alertVC.addAction(PMAlertAction(title: "OK", style: .Default, action: { () in
        print("Capture action OK")
    }))

    self.presentViewController(alertVC, animated: true, completion: nil)

to my ViewController.

However, I get this error:

Use of unresolved identifier 'PMAlertController'

pmusolino commented 8 years ago

Hi @JamesGDEv.

I think that you have to set the target for the library, like that: w49az

Let me know. Thanks -Paolo