Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

为什么我不能打印出objectId这个数据, 我打印出来的是NULL #1

Open
JJJJJJJerk opened this issue May 19, 2015 · 2 comments

Comments

@JJJJJJJerk
Copy link

BmobObject *obj = [self.posts objectAtIndex:indexPath.row];
ForumPost *fPost = [[ForumPost alloc]init];
fPost.objectId = (NSString *)[obj objectForKey:@"objectId"];
NSLog(@"objectId%@",(NSString *)[obj objectForKey:@"objectId"]);
fPost.title = [obj objectForKey:@"title"];
fPost.content = [obj objectForKey:@"content"];
return fPost;

}
title和content这两列的数据能够显示出来!就是objectId显示不出来,这个是不是很免费用户的功能锁定有关啊?我是初学者,

@JJJJJJJerk
Copy link
Author

哦 我知道了
/**

  • BmobObject对象的id
    */
    @Property(nonatomic,copy)NSString *objectId;

/**

  • BmobObject对象的最后更新时间
    */
    @Property(nonatomic,retain)NSDate *updatedAt;

/**

  • BmobObject对象的生成时间
    */
    @Property(nonatomic,retain)NSDate *createdAt;

/**

  • BmobObject对象的表名
    */
    @Property(nonatomic,copy)NSString * className;

/**

  • 权限控制里列表
    */
    @Property(nonatomic,retain)BmobACL *ACL;

这个数据列直接使用property的点语法就可以了 不需要value for key

@pzee
Copy link
Contributor

pzee commented May 20, 2015

是的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants