Skip to content

Commit

Permalink
Rename description to userDescription to get rid of obj-c reserved word
Browse files Browse the repository at this point in the history
  • Loading branch information
saiday committed May 4, 2015
1 parent 672f050 commit e2bad62
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/WeiboSDK/Models/User.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ typedef enum {
@property (nonatomic, copy) NSString *province; //用户所在省级
@property (nonatomic, copy) NSString *city; //用户所在城市
@property (nonatomic, copy) NSString *location; //用户所在地
@property (nonatomic, copy) NSString *description; //用户个人描述
@property (nonatomic, copy) NSString *userDescription; //用户个人描述
@property (nonatomic, copy) NSString *url; //用户博客地址
@property (nonatomic, copy) NSString *profileImageUrl; //用户头像地址
@property (nonatomic, copy) NSString *profileLargeImageUrl; //用户大头像地址
Expand Down
6 changes: 3 additions & 3 deletions src/WeiboSDK/Models/User.m
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ - (void)encodeWithCoder:(NSCoder *)encoder
[encoder encodeObject:self.province forKey:@"province"];
[encoder encodeObject:self.city forKey:@"city"];
[encoder encodeObject:self.location forKey:@"location"];
[encoder encodeObject:self.description forKey:@"description"];
[encoder encodeObject:self.userDescription forKey:@"description"];
[encoder encodeObject:self.url forKey:@"url"];
[encoder encodeObject:self.profileImageUrl forKey:@"profileImageUrl"];
[encoder encodeObject:self.profileLargeImageUrl forKey:@"profileLargeImageUrl"];
Expand Down Expand Up @@ -59,7 +59,7 @@ - (id)initWithCoder:(NSCoder *)decoder
self.province = [decoder decodeObjectForKey:@"province"];
self.city = [decoder decodeObjectForKey:@"city"];
self.location = [decoder decodeObjectForKey:@"location"];
self.description = [decoder decodeObjectForKey:@"description"];
self.userDescription = [decoder decodeObjectForKey:@"description"];
self.url = [decoder decodeObjectForKey:@"url"];
self.profileImageUrl = [decoder decodeObjectForKey:@"profileImageUrl"];
self.profileLargeImageUrl = [decoder decodeObjectForKey:@"profileLargeImageUrl"];
Expand Down Expand Up @@ -97,7 +97,7 @@ - (id)initWithJsonDictionary:(NSDictionary*)dic
self.province = [Resources getProvinceName:provinceId];
self.city = [Resources getCityNameWithProvinceId:provinceId withCityId:cityId];
self.location = [dic stringValueForKey:@"location"];
self.description = [dic stringValueForKey:@"description"];
self.userDescription = [dic stringValueForKey:@"description"];
self.url = [dic stringValueForKey:@"url"];
self.profileImageUrl = [dic stringValueForKey:@"profile_image_url"];
self.profileLargeImageUrl = [dic stringValueForKey:@"avatar_large"];
Expand Down

0 comments on commit e2bad62

Please sign in to comment.