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

[ASDisplayNode] Allow setting stretchable contents on nodes; add bridged properties. #trivial #429

Merged
merged 1 commit into from
Jul 9, 2017

Conversation

appleguy
Copy link
Member

@appleguy appleguy commented Jul 9, 2017

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!

…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!
@appleguy appleguy self-assigned this Jul 9, 2017
@@ -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
Copy link
Member Author

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Contributor

@maicki maicki left a 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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@appleguy
Copy link
Member Author

appleguy commented Jul 9, 2017

@maicki thanks man :) Is there a UIKit method that does this, or you mean UIImageView?

@appleguy appleguy merged commit bc361ca into master Jul 9, 2017
@appleguy appleguy deleted the ContentsBridge branch July 9, 2017 17:54
bernieperez pushed a commit to AtomTickets/Texture that referenced this pull request Apr 25, 2018
…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!
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.

None yet

2 participants