I'm trying to call a function from AppDelegate, and using that function I'm trying to perform segue.

[![My Storyboard](https://i.stack.imgur.com/ip5ve.png)](https://i.stack.imgur.com/ip5ve.png)  

(Click images to enlarge)

```swift
func doSegue (_ verification : Bool) {
    if verification {
        print ("Segue performed")
        LoginVC ()
        .performSegue (withIdentifier: "tosignup", sender: nil)
    }
    else { print("An error occured while login") }
}
func btnremove () {
    print ("Segue performed 1")
    loginbtn.isHidden = true doSegue (true)
}

```

These are the errors which came beyond execution.

[![These are the errors which came beyond execution.](https://i.stack.imgur.com/HtYzA.png)](https://i.stack.imgur.com/HtYzA.png)