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

使用Xib时,部分属性设置无效 #44

Open
Renford opened this issue Jun 13, 2018 · 2 comments
Open

使用Xib时,部分属性设置无效 #44

Renford opened this issue Jun 13, 2018 · 2 comments

Comments

@Renford
Copy link
Contributor

Renford commented Jun 13, 2018

1、部分属性设置无效:因为设置属性时,view可能还没创建
2、不提前设置placeholderImage,会闪退

这里是修复的参考方案 #45

@Renford Renford changed the title 实际使用的俩问题 使用Xib时,部分属性设置无效 Jun 13, 2018
@codingZero
Copy link
Owner

我已经很久没做iOS了,这玩意儿也很久没维护了,心血来潮打开github看了一下,就看到了你的pull请求,不太明白,把_xxx改为self.xxx的用意何在?

@Renford
Copy link
Contributor Author

Renford commented Jun 13, 2018

都转行啦,厉害!!
因为属性设置的时候使用的是_xxx,这时候_xxx可能还没有创建,而self.xxx会调用你的懒加载

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