原因:只能在init方法中给self赋值,Xcode判断是否为init方法规则:方法返回id,并且名字以init
出错代码:- (id) Myinit{
}
解决方法:- (id) initWithMy
{
}
Cannot assign to 'self' outside of a method in the init family,布布扣,bubuko.com
Cannot assign to 'self' outside of a method in the init family
原文:http://blog.csdn.net/qi_ruihua/article/details/19981215