Darkseal / DownPicker

A lightweight DropDownList / ComboBox for iOS, written in Objective-C
MIT License
202 stars 93 forks source link

Arrow Image dissapeared #15

Closed WedgeSparda closed 8 years ago

WedgeSparda commented 8 years ago

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

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

Darkseal commented 8 years ago

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 commented 8 years ago

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

nonannoyance commented 8 years ago

I grabbed version 0.1.25 and still see the issue.

Darkseal commented 8 years ago

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 commented 8 years ago

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

Darkseal commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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

leaobicalho commented 8 years ago

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

Darkseal commented 8 years ago

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 commented 8 years ago

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

WedgeSparda commented 8 years ago

YEAH! It works :dancer:

Thank you so much.

aadi007 commented 8 years ago

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

navneetkarnani commented 8 years ago

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 commented 8 years ago

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

iMarwan-k commented 8 years ago

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