Skip to content

Conversation

@liugangios
Copy link

No description provided.

- (void)setTitle:(NSString *)title
{
_title = [title copy];
_title = title;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我认为,属性中的copy是在自动生成setter时采用copy方式赋值。
手动添加setter时仍然需要手动copy。
所以这里仍然需要 _title = [title copy];

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

Successfully merging this pull request may close these issues.

2 participants