How do I override the “view” property in UIViewController?
问题 I have a custom UIViewController and custom UIView. I'd like to override the viewcontroller.view property to return MyCustomUIView. Right now I have: @interface MyViewController : UIViewController { IBOutlet MyView* view; } @property (nonatomic, retain) IBOutlet MyView* view; This compiles but I get a warning: property 'view' type does not match super class 'UIViewController' property type. How do I alleviate this warning? 回答1: The short answer is that you don't. The reason is that properties