unknown type name in objective c

前端 未结 6 1590
生来不讨喜
生来不讨喜 2021-01-03 22:55

I\'m pretty new to objective c, and having some basic problems.

I wrote a simple program using a navigator, and everything worked fine. then I added few lines of cod

6条回答
  •  北海茫月
    2021-01-03 23:19

    @JustAStranger and @NathanielSymer, both are correct!

    Anyway, worth remember that this case, below, has the same problem too:

    Class_A.h: #import "Class_B.h"

    Class_B.h: #import "Class_C.h"

    Class_C.h: #import "Class_A.h"

    This problem reveal to us how important is take care about owners at our Class relationships. Is very easy creates cycle problems using ObjC headers.

提交回复
热议问题