stripe payments - init problems with PTKView in Swift -
I'm trying to add an init (fast) so I allocated PTKView at the top of the square I can use it throughout my code
I can create var PATMTVVe: PTKView in a fashion and it works fine but is not clearly global
So I created this on top of the square:
class PaymentViewController: UIViewController, PTKViewDelegate {var PaymentView: PTKView Button = UIButton {Self.PaymentView = PaymentView self.button = button} as the buttonWithType (UIButtonType.System) UIButton init (: PTKView, Button: PaymentView UIButton)
I get this time a horrible The error is saying:
Required initialiser 'init (coder)' must be provided by the subclass of UIViewController.
Any ideas at all would be great.
Add it to your vc:
required init (encode In aDecoder: NSCoder) {FatalError ("Init (encoder :) is not implemented")}
You need to apply this initializer (thus' required 'Keyword) If you do not want to support it, just leave FatalError
then people know
init. (PaymentView: PTKView, Button: UIButton) {self.PaymentView = PaymentView self.button = button super.init ()}
Comments
Post a Comment