美文网首页
斯坦福ios7 lecture4 要点

斯坦福ios7 lecture4 要点

作者: 五常大米娃 | 来源:发表于2017-03-04 21:02 被阅读0次

    1.Creating Objects

    有时候class creator和init method同时存在

    Class creator method:[NSString stringWithFormat:...]

    Init method:[NSString alloc] init]

    苹果公司倾向使用后者

    2.you can ask other Objects to create new object s for you

    3.but not all Objects given out by other Objects are newly created

    4.Sending messages to nil is mostly OK.

    5.all object pointers are treated like id at runtime.

    Dynamic binding:

    6.Static typing

    7.never use id *

    8.casting

    9.Introspection内省

    10.Protocols

    Does not specify the class of an object pointed to,  but  does specify what methods it implements.

    In between id and static typing


    相关文章

      网友评论

          本文标题:斯坦福ios7 lecture4 要点

          本文链接:https://www.haomeiwen.com/subject/sohuwttx.html