swift - Page View Controller viewDidLoad() Issues -


i'm learning swift/xcode , trying create app 3 pages can swipe , forth using page view controller. issues i'm having lie in uiviewcontroller subclass, more viewdidload() function. i'm getting errors "value of type 'nameofmyclass' has no member datasource/delegate" , "use of unresolved identifier "setviewcontrollers". i've followed many tutorials , checked other posts no 1 seems having these issues. when attempted run black screen, , terminated due signal 15 error.

here's relevant code errors popping up:

import uikit  class rootpageviewcontroller: uiviewcontroller,  uipageviewcontrollerdatasource, uipageviewcontrollerdelegate {      lazy var viewcontrollerlist:[uiviewcontroller] = {          return [self.vcinstance(name: "missionone"),                 self.vcinstance(name: "missiontwo"),                 self.vcinstance(name: "missionthree")]      }()      private func vcinstance(name: string) -> uiviewcontroller {         return uistoryboard(name: "main", bundle:       nil).instantiateviewcontroller(withidentifier: name)     }      override func viewdidload() {         super.viewdidload()         self.datasource = self //...has no member 'datasource' error         self.delegate = self //...has no member 'delegate' error         if let missionone = viewcontrollerlist.first {             setviewcontrollers([missionone], direction: .forward, animated:           true, completion: nil)           //use of unresolved indentifier 'setviewcontrollers' error         }      }      override func didreceivememorywarning() {         super.didreceivememorywarning()         // dispose of resources can recreated.     } 

the other issue i'm having, , may related, page view controller not accepting/recognizing class file set custom class in story board.

thanks in advance insight or suggestions.

your rootpageviewcontroller subclass of uiviewcontroller, not uipageviewcontroller


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -