Giter Site home page Giter Site logo

子类的初始化方法中通过super调用父类的初始化方法,参数会变为nil,大家有遇到这个问题吗,或者应该怎么解决 about mango HOT 3 CLOSED

ypliang19 avatar ypliang19 commented on June 17, 2024
子类的初始化方法中通过super调用父类的初始化方法,参数会变为nil,大家有遇到这个问题吗,或者应该怎么解决

from mango.

Comments (3)

itdongbaojun avatar itdongbaojun commented on June 17, 2024

-(instancetype)initWithFrame:(CGRect)frame configuration:(WKWebViewConfiguration *)configuration {
...
self = [super initWithFrame:frame configuration: configuration];
...
return self;
}

上述代码写成mango后
self = super.initWithFrame:configuration:(frame,configuration);
是否存在问题?
通过super调用父类的方法后,会报Configuration为空
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Configuration cannot be nil'

上述问题该怎么解决呢?还是我哪里写的有问题?
@YPLiang19

from mango.

xzwgithub avatar xzwgithub commented on June 17, 2024

应该是脚本语言写的有问题,我也遇到过类似的初始化方法,参数为空

from mango.

YPLiang19 avatar YPLiang19 commented on June 17, 2024

十分感谢🙏,已修复。

from mango.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.