#import in objective C: Am I doing this wrong?

前端 未结 3 1922
孤独总比滥情好
孤独总比滥情好 2021-01-21 07:48

Sorry, couldn\'t find a more appropriate title.

In My code I have two classes which should know of each others existence. So I use an instance variable which points to t

3条回答
  •  野的像风
    2021-01-21 08:12

    you could remove the import from IRCConnection.h and use a @class statement instead.

    like this:

    #import 
    
    @class MainMenuController;
    
    @interface IRCConnection : NSObject {
    

    then add a #import "MainMenuController.h" to IRCConnection.m

提交回复
热议问题