-
Notifications
You must be signed in to change notification settings - Fork 119
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
super.contents = super.contents; 这个我看不懂~为啥要再赋值一遍 #18
Comments
Assigning a value to this property causes the layer to use your image rather than create a separate backing store. |
Thx bro |
Texture 里的用法, - (void)_hackResetNeedsDisplay
{
ASDisplayNodeAssertMainThread();
// Don't listen to our subclasses crazy ideas about setContents by going through super
super.contents = super.contents;
}
- (void)display
{
ASDisplayNodeAssertMainThread();
[self _hackResetNeedsDisplay];
if (self.displaySuspended) {
return;
}
[self display:self.displaysAsynchronously];
} |
|
|
简单总结就是 ‘设置当前的contents为super.conents’ |
如果是这样,为啥不是self.contents=super.contents |
我猜作者是防止调到子类的 |
(void)display {
//这个我看不懂~为啥要再赋值一遍
super.contents = super.contents;
[self _displayAsync:_displaysAsynchronously];
}
The text was updated successfully, but these errors were encountered: