在.m中写成 如下形式既为私有的形式 @interface ViewController () 这里只是声明类名和括号即可 /////方法等 @end 转载于:https://www.cnblogs.com/lisa090818/p/3296554.html