-
Notifications
You must be signed in to change notification settings - Fork 141
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
block里面全是成员变量 #26
Comments
截个图看看哪些成员变量导致了警告 |
xcode版本能否告知? |
@chennyhuang 9.4 |
理论上UIview的block不会造成循环引用: |
当 block 本身不被 self 持有,而被别的对象持有,同时不产生循环引用的时候,就不需要使用 weak self 了。最常见的代码就是 UIView 的动画代码,我们在使用 UIView 的 animateWithDuration:animations 方法 做动画的时候,并不需要使用 weak self,因为引用持有关系是: UIView 的某个负责动画的对象持有了 block |
@chennyhuang 谢谢,学到了,请问作者,可以展示本地拿到的UIImage吗 |
不支持本地,本地的自己写一个了,太简单 |
去除Block中实例变量警告的方法:Building Settings ->搜索implicit retain of 'self' ,将对应的值改为NO |
我把代码拖进项目中,马上26个警告,这么写好吗?朋友
The text was updated successfully, but these errors were encountered: