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

Arrow Image dissapeared #15

Closed
WedgeSparda opened this issue Aug 28, 2015 · 21 comments
Closed

Arrow Image dissapeared #15

WedgeSparda opened this issue Aug 28, 2015 · 21 comments

Comments

@WedgeSparda
Copy link

I don't see anymore the arrow image over the picker.

captura de pantalla 2015-08-28 a las 10 27 02

@Darkseal
Copy link
Owner

I could've made something wrong during the process of re-factoring the library for CocoaPods. Quite sure it has something to do with the file path(s) because I didn't made changes to that part of the code... will check this evening.

@Darkseal
Copy link
Owner

Pushed 0.1.25 which should fix the issue. Please let me know if it can be closed now.

@nonannoyance
Copy link

I grabbed version 0.1.25 and still see the issue.

@Darkseal
Copy link
Owner

I tried a different approach and fully tested it on iOS 6, 7.1 and 8.1 found it always working as expected, with arror correctly showing. Try to pull the 0.1.27 and see if the problem is gone for good.

@WedgeSparda
Copy link
Author

Just tried with iOS 7 and 8, but the arrow image still doesn't show up.

@Darkseal
Copy link
Owner

I can see the icon either installing it via CocoaPods or installing it manually.

Please try to install manually the library and let me know if you can see it, so at least I'll know if it's a CocoaPods-related bug or not.

@Darkseal
Copy link
Owner

Pushed 0.1.28 with another approach taken from StackOverflow. I still can't reproduce the issue, since the image properly loads in my case... Could you try it with and without CocoaPods and tell me if it's working either way? Thanks.

@WedgeSparda
Copy link
Author

I tried the last version but image still doesn't appear. Also tried to copy the images outside de pod's bundle and doesn't work either. I debugged the code and saw that the UIImage is certainly loaded and isn't nil.

Also tried to add self->textField.rightView.tintColor = [UIColor blackColor]; after image is set, in case is using a clear or white as tint color, but didn't work either.

@Darkseal
Copy link
Owner

Darkseal commented Sep 1, 2015

I tried the same things, but I always see the image: I also tried to point to a different namespace (DownPickerr.bundle instead of DownPicker.bundle) and the image is "correctly" missing that way, just as expected. I guess it could be related to your specific CocoaPods installation? I really don't know why this is happening. The inability to reproduce it makes me unable to fix that for good.

Could you try to drag the library out of CocoaPods (including .h and .m files) and install/include it manually like you did in the first place? I would like to know if this is a CocoaPods-related issue or not.

@WedgeSparda
Copy link
Author

Just removed the pod and tried with manual install. Same behaviour, the image doesn't show up :(
Also tried cleaning project but nothing accomplished.

@Darkseal
Copy link
Owner

Darkseal commented Sep 1, 2015

Ok, so it should be an issue related to the code changes I made in 1.0.23. That's strange because I didn't touch anything related to image behaviours. Can I have your code sample with array so I can run your same check with your same data? (or any sample showing up the issue).

@WedgeSparda
Copy link
Author

Just created a "Single View Project". Added DownPicker with CocoaPods. Added a UITextField to the created View Controller and added this code to the viewDidLoad (also a DownPicker instance, of course).

NSArray *elements = @[@"One", @"Two", @"Three", @"Four", @"Five"];
self.picker = [[DownPicker alloc] initWithTextField:self.textField withData:elements.mutableCopy];

But the image didn't show up.

@Darkseal
Copy link
Owner

Darkseal commented Sep 1, 2015

Thanks, will replicate the whole thing this evening and look into it.

@leaobicalho
Copy link

Use showArrowImage ( [downPicker showArrowImage:YES] ) to show imagem!!

@Darkseal
Copy link
Owner

Darkseal commented Sep 1, 2015

Just created my TestPicker project with the same identical settings mentioned by @WedgeSparda ... no image. Then I added showArrowImage:YES, as per @leaobicalho suggestion, and I got it showing.

@leaobicalho : thanks for pointing it out, it seems like we were chasing rabbits. Funny thing is that showArrowImage used to be a default behaviour, but it has been probably removed somehow during the latest changes. I'm adding it back in the next release because I feel like the arrow should be there by default.

@WedgeSparda : please let me know if adding the showArrowImage:YES does solve your issue too. You can remove that as soon as I publish the next release.

Side note: I had [showArrowImage:YES] it in my main testing project this whole time, that's why I always show it.

@Darkseal
Copy link
Owner

Darkseal commented Sep 1, 2015

Pushed 0.1.29 with [showArrowImage:YES] set as default. Hope that will solve this issue for good.

@WedgeSparda
Copy link
Author

YEAH! It works 💃

Thank you so much.

@aadi007
Copy link

aadi007 commented Feb 3, 2016

if (img == nil) img = [UIImage imageNamed:@"DownPicker.bundle/downArrow.png"]; // CocoaPods
returns nil although backArrow.png is present in the resource folder.

@navneetkarnani
Copy link

If it helps, I added the downarrow images to my project copy resources phase, and the arrow showed up. I am using Xcode 7.3 and Swift.

Earlier, I did try adding it to the CocoaPod generated "Pod" project, but that did not help.

@venturafonso
Copy link

@navneetkarnani Thanks a lot, was struggling with this until I read your comment, fixed it immediately.

@iMarwan-k
Copy link

@navneetkarnani I think this is the only way to make it works with swift, thanks a lot

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

No branches or pull requests

8 participants