This is due to your function showError() being static (so a Class function), but present() from UIViewController is an instance method.
The showError() function should not be static. Try removing the static keyword, then it should work.
Topic:
Programming Languages
SubTopic:
Swift
Tags: