-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[ASDisplayNode] Allow setting stretchable contents on nodes; add bridged properties. #trivial #429
Conversation
…ged properties. This makes it much easier to use the ASCoreAnimationExtras method which offers by far the most efficient way to display a stretchable image. In the future, we should move that function to UIImage+ASConvenience or another header where it can be more easily found and enjoyed!
@@ -621,29 +621,32 @@ extern NSInteger const ASDefaultDrawingPriority; | |||
*/ | |||
- (void)layoutIfNeeded; | |||
|
|||
@property (nonatomic, strong, nullable) id contents; // default=nil | |||
@property (nonatomic, assign) CGRect frame; // default=CGRectZero |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should definitely do additional cleanup in this header. However, I made a few improvements (no breaking changes of course) so that the most commonly used properties are more towards the top and more logically grouped.
Because this is still pretty far from ideal, let's not worry too much about optimizing it in this patch - but at least it will be slightly better until we get around to it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@appleguy Awesome becoming parity with UIKit around stretchable contents!
@@ -621,29 +621,32 @@ extern NSInteger const ASDefaultDrawingPriority; | |||
*/ | |||
- (void)layoutIfNeeded; | |||
|
|||
@property (nonatomic, strong, nullable) id contents; // default=nil | |||
@property (nonatomic, assign) CGRect frame; // default=CGRectZero |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@maicki thanks man :) Is there a UIKit method that does this, or you mean UIImageView? |
…ged properties. (TextureGroup#429) This makes it much easier to use the ASCoreAnimationExtras method which offers by far the most efficient way to display a stretchable image. In the future, we should move that function to UIImage+ASConvenience or another header where it can be more easily found and enjoyed!
This makes it much easier to use the ASCoreAnimationExtras method which offers by
far the most efficient way to display a stretchable image.
In the future, we should move that function to UIImage+ASConvenience or another
header where it can be more easily found and enjoyed!