-1

I am trying to designate on a storyboard a UIViewController as my own custom class SimpleSafariViewController. The compiler won't let me override init() method to preload http://news.google.com

Compile error is "Override of init method is unavailable" If the compiler allowed me, I would have the following code

SimpleSafariViewController
    convenience init() {
        super.init(URL: URL("http://news.google.com"), entersReaderIfAvailable: true)
    }

If so, then is there another way of solving this.

I have posted the simplest project on github

https://github.com/joshuacalloway/SimpleSafari

swift 2.1, xcode 7.2

jcalloway
  • 1,155
  • 1
  • 15
  • 24

1 Answers1

0

You are not using SFSafariViewController like suggested to do so. It is not meant to sit as a ViewController on your StoryBoard. The implementation in SuggestedSafariViewController is the correct way to do it. (Agree with @matt)

sschale
  • 5,168
  • 3
  • 29
  • 36