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

@property (copy, nonatomic) NSString *title; 中已经有copy #426

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

liugangios
Copy link

No description provided.

@@ -84,7 +84,7 @@ - (void)setupTitleLabel

- (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