Jacob
Jacob

Reputation: 1395

ObjC no visible @interface for one instance but not another

I’ve attached a screenshot of two lines that I believe are for, the intent of this question, the same. Both inner and [MTInnerDisplay init] are instances of MTInnerDisplay, yet when accessing the subAtomForIndexType on the inner instance gives an error.

I can compile and run accessing subAtomForIndexType with [MTInnerDisplay init], but not inner.

In addition, if I factor out [MTInnerDisplay] into its own variable, and then reference it that way, I get the error as for inner.

What am I doing wrong?

enter image description here

Upvotes: 0

Views: 28

Answers (1)

gnasher729
gnasher729

Reputation: 52592

[MTInnerDisplay init] is trying to call a class method named init. Highly unlikely that it exists.

Upvotes: 2

Related Questions