您的位置:首页 > 产品设计 > UI/UE

error: request for member 'nameLabel' in something not a structure or union 的原因

2011-06-08 09:01 591 查看
参考链接:  http://stackoverflow.com/questions/2184419/what-does-request-for-member-in-something-not-a-structure-or-union-me  最根本的原因在于 1, 你要去访问一个Object 或者 Structure里没有的成员变量.  class TestClass {
UILabel *nameLabel;
}
TestClass t = [TestClass new];
t.numberLabel.text = @"haha";//TestClass根本没有numberLabel.所以访问不了.
 [t release];2,或者你访问的这个对象根本不是对象. 
struct {    int a;    int b;} foo;int fum;fum.d = 5;//fum根本不是对象 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  structure object
相关文章推荐