search

Home  >  Q&A  >  body text

objective-c - 初学oc 感觉方法很多很乱,怎么记,有没有资料整合在一起,求资料!!!!

初学oc 感觉方法很多很乱,怎么记,有没有资料整合在一起,求资料!!!!万分感激哦

漂亮男人漂亮男人2824 days ago715

reply all(4)I'll reply

  • 滿天的星座

    滿天的星座2017-04-28 09:07:01

    It is unreliable to regard documents or what you call integrated materials as tutorials.
    1. The documents are too complicated and include too many things, and you will not be able to remember them even after reading them. 2. Technology is frequently updated and iterated. , you just finished reading the old version and maybe there is a new version (oc is quite stable, but swift is a bit buggy)
    My personal approach is:

    1. Familiar with grammar

    2. Read the documentation briefly (just know what the major components are)

    3. Be familiar with the life cycle of components (this one is very important. You don’t need to remember the specific functions, but you must be familiar with the life cycle, otherwise it is easy to cause problems. I also stepped on a lot of pitfalls on this)

    4. Check up whatever is used in development. Guess the functions you need to use first. You must be familiar with the naming methods of the developers and organizations of the framework or components. With an IDE, it is actually easy to guess the naming of Zhongyuan developers.

      For example, if we want to push an object into NSMutableArray, assuming we don’t know how to push at this time, we can make some attempts,

    For example, there is an array named array, so we try this

    //注意这里是尝试,事实objc并没有这个方法,于是发现push没有相关提示
    [array push];

    Then try another word, such as add

    //尝试
    [array add]
    //发现有提示
    [array addObject:...];

    So we know that pushing an object to the array in oc is

    [array addObject:...]

    Note that the developers of objc are humans, and they also program with human thinking, so we can make some reasonable assumptions during the programming process. You can think about what methods you would provide users if it were you, as long as they are consistent. It's reasonable and can usually be guessed.

    5. I really can’t guess, Baidu, Google.

    6. There is nothing you can do about the search engine. Ask in the group, ask in the community, look for official documents and take a closer look, etc.

    The above are some personal opinions, I hope it will be helpful to you

    reply
    0
  • 怪我咯

    怪我咯2017-04-28 09:07:01

    OC is really messy, take your time

    reply
    0
  • 曾经蜡笔没有小新

    曾经蜡笔没有小新2017-04-28 09:07:01

    OC is really messy, take your time

    reply
    0
  • 曾经蜡笔没有小新

    曾经蜡笔没有小新2017-04-28 09:07:01

    1. Don’t xcode have automatic prompts? Can solve some memory problems

    2. Be good at using baidu or google

    3. Use more and write more, and you will naturally remember it

    reply
    0
  • Cancelreply