Objective C interfaces, delegates, and protocols

前端 未结 3 529
难免孤独
难免孤独 2021-01-05 17:27

So I\'m trying to wrap my head around Objctive-C interfaces, delegates and protocols. So I have a question:

Does a delegate have to be in a separate file or can it

3条回答
  •  我在风中等你
    2021-01-05 18:08

    I would suggest checking out:

    The Objective-C 2.0 Programming Language

    It should have the answer to most of your questions about protocols and interfaces.

    Protocols

    Interfaces

    As far as delegates, they can be a new object or the object in which you are creating the thing needing a delegate. Files don't really have anything to do with it.

提交回复
热议问题