0
votes

In my swift app I am trying to make it so that a button tap switches view controllers. This is the code I am using:

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

This returns the error "Cannot invoke 'presentViewController' with an argument list of type')pythTheoremViewController.Type, animated: Bool, completion: nil)

What does this mean and how do I fix it?

2

2 Answers

1
votes

if your ViewController-instance is pythTheoremViewController, remove the self

0
votes

Sorry for the stupid question! I used the autocorrect .self option, when I should have used () after the view controller name.