Skip to content
This repository has been archived by the owner on Aug 1, 2019. It is now read-only.

cannot set avatar if the image is loaded from file #35

Closed
jun1st opened this issue Aug 30, 2016 · 5 comments
Closed

cannot set avatar if the image is loaded from file #35

jun1st opened this issue Aug 30, 2016 · 5 comments

Comments

@jun1st
Copy link

jun1st commented Aug 30, 2016

Cannot set avatar if the image is loaded from file.

I download profile image and save it to the device, and then loaded it into NSData, create UIImage, set it as avatar

But got an error "cannot get relative dimension"

Only works with resource images now :(

@atainter
Copy link
Contributor

Did you set preferredFrameSize on your ASImageNode?

@jun1st
Copy link
Author

jun1st commented Aug 31, 2016

It is the problem.

It works after setting the preferredFrameSize. Thanks a lot

@jun1st jun1st closed this as completed Aug 31, 2016
@atainter
Copy link
Contributor

👍

@munsifhayat
Copy link

Value of type 'ASImageNode' has no member 'preferredFrameSize' ??

@munsifhayat
Copy link

Changed to :

    avatar.style.preferredSize = CGSize(width: 25, height: 25)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants