Tag: class extensions

* .h和* .m文件中的两个接口

对不起,我的英语,让我的心说:)在我工作的一个项目中,我注意到了一个有趣的时刻。 在* .h文件中声明的接口: @interface FrontViewController : UIViewController … @end 而在* .m文件中,我find了另一个接口。 @interface FrontViewController() // Private Properties: @property (retain, nonatomic) UIPanGestureRecognizer *navigationBarPanGestureRecognizer; // Private Methods: – (IBAction)pushExample:(id)sender; @end @implementation FrontViewController … @end 为什么需要? 有什么意义? 我想这是为了方便。 是?