I have this before the interface declaration in the header MainView.h.
typedef enum { UNKNOWN, CLEAR, NIGHT_CLEAR, CLOUDY, NIGHT_CLOUDY } Weather;
Then I announced the following:
Weather weather;
Then he made an accessory:
@property Weather weather;
And synthesized it.
My question is, how can I use this in another class without failing it? I have imported the title for MainView. I tried using it as follows:
MainView* myView = (MainView*)self.view;
[myView setWeather: CLEAR];
It does not throw me any errors in Xcode, but it crashes when running the code, saying:
-[UIView setWeather:]: unrecognized selector sent to instance *blah*
Am I doing something wrong here?
source
share