I use the following code to get my View out of my controller:
CollectionItemView *myView = [self view];
This works pretty well, but I get the warning Incompatible pointer types initializing CollectionItemView __strong with an expression of type NSView
. I understand why i get this but is it okay to ignore it or should I overwrite the view property ?
chuck
If you are sure that [self view]
is CollectionItemView
just do:
CollectionItemView *myView = (CollectionItemView*)[self view];
or (which is better) you can use:
id myView = [self view];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With