-
Notifications
You must be signed in to change notification settings - Fork 33
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
Setting image programmatically with a URLRequest #10
Comments
Programtically setting the image should work, I'll look into this later today |
hmm strange just tested this out and everything works as it should. Could you please attach a demo project to help me better understand what exactly is going on? |
Hm that's strange. Yep! Attached is a demo project. In MoviesDetailViewController.swift I have a variable called gradientBG which is an IBOutlet to the ComplimentaryGradientView in the Storyboard. In the setupUI() method I set the image for the gradientBG to the image received from the AFNetworking method, setImageWith, which sets a UIImage based on a request. It runs Swift 3 & Xcode 8-- let me know if you need any more clarification on the demo. |
I was able to get it working for an image I have saved in my project but not for one being downloaded from the web |
Figured out the problem. The gradient layer wasn't being added when the image is set, I've fixed it and will update the pod soon. just |
Great! Thanks-- I'll run |
Do you have a demo of this working? The image still isn't being set when I run it with the update |
hmm, strange i tested it on the project you attached it worked fine. see the attached folder |
Are images able to be set without specifying the image name in the Storyboard? For some reason, when I set the image programmatically, to either an image in the project or one downloaded from the web, it doesn't work unless I specify it in the storyboard as well.
This works when I set the following in Storyboard:
However, because I want to generate a gradient from an image downloaded from the web, I cannot set it's filename in Storyboard.
Is there something I'm missing to be able to set a gradient on an image without specifying it's name in Storyboard?
Thank you for the fantastic project!
The text was updated successfully, but these errors were encountered: