I created a new custom view class (subclass of UIView) and changed the view's class in interface builder. However, it seems neither Xcode nor the compiler knows my view controller's view has changed class.
For instance, I have a selector in my custom view: -(void) changeShape
I try to call in my view controller [self.view changeShape], there is no auto-completion and the compiler produces a warning that "view may not respond to changeShape".
The app runs in the simulator without issue though.
I wonder how to properly let the compiler know the view's class has been changed?
Thanks
Leo
NSString *className = NSStringFromClass([self.view class]);
But I guess it's useless for your aim, just cast type[(MyView*)self.view changeShape]
; – beryllium