I have the following issue. I have made a UIButton in my Appdelegate and i want that button navigate me to another ViewController. I already made a connection from my Storyboard, this connection is a type Modal Segue. I thought that performSegueWithIdentifier will do the job but it gives me the following error "has no segue with identifier 'showCamera' ". And im pretty sure that i have made that Identifier trough the Storyboard.
let camera = UIButton.buttonWithType(UIButtonType.Custom) as UIButton
camera.addTarget(self, action: "takePicture:", forControlEvents: .TouchUpInside);
//this function works
func takePicture(sender: UIButton!){
println("Open Camera")
//this throws an error
self.window?.rootViewController?.performSegueWithIdentifier("showCamera", sender: self)
}
I would be very gratefull if someone can help me out with this.
0 comments:
Post a Comment