Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

初始化方法部分,有些表意不明 #60

Open
huangxinyu1213 opened this issue May 17, 2016 · 2 comments
Open

初始化方法部分,有些表意不明 #60

huangxinyu1213 opened this issue May 17, 2016 · 2 comments

Comments

@huangxinyu1213
Copy link

喵神在“Designated,Convenience和Required”小节部分,PDF的44页最后说到:“所有的convenience初始化方法都必须调用同一个类中的designated初始化完成设置,另外convenience的初始化方法是不能被子类重写或者从子类中以super的方式被调用的。”,而在该小节最后说到:“对于convenience的初始化方法,我们也可以加上required以确保子类对其进行实现”,在这两部分,前一个说convenience方法不能被子类重写,后面又说可以被重写,不知是不是鄙人才疏学浅,不知大意,所以还请喵神指教。

@WangJace
Copy link

我也遇到了这个问题,看了《The Swift Programing Language》(中文版)中构造过程这一章节,我觉得Convenience的初始化方法是可以被子类重写的

@whycodingJason
Copy link

我还没有看到,不过来看看你们看到的问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants