Coder Social home page Coder Social logo

darkseal / downpicker Goto Github PK

View Code? Open in Web Editor NEW
202.0 202.0 93.0 213 KB

A lightweight DropDownList / ComboBox for iOS, written in Objective-C

License: MIT License

Objective-C 86.68% Ruby 13.32%
cocoapods control-wrapper dropdownlist ios objective-c uitextfield

downpicker's Introduction

downpicker's People

Contributors

darkseal avatar jackgitsource avatar lijo050 avatar qaziatiq avatar readmecritic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

downpicker's Issues

With two pickers, one needs double tap to open

Hi

I have to downpickers in the same view,and the first one is working ok,but de second one I need to double tap to open it

Downloaded de project with many pickers and still not opening de second one

Spinner starts at non zero index value

Is it possible to make the value that the spinner starts at some non zero index as opposed to zeroth index? So you could still spin up to zeroth index value, but it would start at some non zero index value.

Multiple Down Pickers

When I set up multiple down pickers in the same pages, If I choose an option for one, it disables all the others.
EDIT: Same if I have another classic UITextField and I type in a value.

DownPicker in custom alert view

Hi!
Is it possible using downpicker in custom alert view (LGAlertView)? Alert view have textfields, i set downpicker for one of them. When click only keybord is shown, not a list.

Demo

please add Demo or wiki

Multiple DownPickers on same view

If I add multiple downpickers in the same view, when I select a option in the first, all others pickers select the first option automatically...

Suggestion

The picker accepts strings, instead, it should accept objects as options and should have description text to show in picker to every corresponding model object

Disabled field

After open and close the downpicker several times, it turns disable, and can't be opened again.

Multiple DropDown usage in One ViewController

I am having a weird issue,

here is what i am doing

 self.maxPricePicker = [[DownPicker alloc] initWithTextField:self.maxPrice withData:self.mainPricesArray];
    [self.maxPricePicker setPlaceholder:@"Max. Price"];

    self.minPricePicker = [[DownPicker alloc] initWithTextField:self.minPrice withData:self.mainPricesArray];
    [self.minPricePicker setPlaceholder:@"Min. Price"];

    self.sizePicker = [[DownPicker alloc] initWithTextField:self.sizeUnit withData:@[@"Sq. Feet", @"Marla", @"Kanal"]];
    [self.sizePicker setPlaceholder:@"Select Size Unit"];

However it seems to me that only MinPrice picker works. When i click on it, suddenly all the picker values change to initial value? Also when i try to pick through other pickers i get a crash at

- (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component
{
    self->textField.text = [dataArray objectAtIndex:row];

    if([self.delegate respondsToSelector:@selector(pickerView:didSelectIndex:)])
        [self.delegate pickerView:pickerView didSelectIndex:row];
}

at  self->textField.text = [dataArray objectAtIndex:row];

textField and pickerView are nil. Not sure why the MinPrice picker is working and others not? and why their value change first time when i click on minPrice

Not Using Built(in Binary Protection )Stack Smashingx EMpos- es App Components to kemory Corruption Attacks

Description
Rtack smashing protection has not been implemented in components included in the application. When an application is
compiled with stack smashing protectionB a known value or XcanaryX is placed on the stack directly before the local variables
to protect the saved base pointerB saved instruction pointerB and function arguments. The value of the canary is verified upon
the function return to see if it has been overwritten. The compiler uses a heuristic to intelligently apply stack protection to a
functionB typically functions using character arrays.
This is a very simple best practice that hardens your app with little to no downside. Memory corruption vulnerabilities can be
very hard to track downB but can be extremely severe.
One thing to note, it is possible that an included binary does not have these protections and it is possible that a third party
would have to correct the problem. In a rare edge caseB Oamarin does include a library called vlMqh#hple)hmmg/t that is not
compiled with RRP but may not be vulnerable because it is an empty file. Ysers should validate that it is in fact empty before
hiding that specific result.

Steps To Reproduce
This test checks if the individual components inside the compiled binary used stack canaries to prevent buffer overflows.

Business Impact
This app does not protect against a specific type of attack that can expose the app to an attacker performing custom actions.
These custom actions could potentially give them access to sensitive information from the app or the device.

Recommended Fix
In OCodeB under the Nuild Rettings for the appB go to the XOther C FlagsX section and add in )>/ hu")mpt du tp)hvv.

"exceeds maximum index value of NSNotFound - 1"

Just created a picker with this

self.transactionTypes = [[NSMutableArray alloc] initWithArray:@[@"Buy", @"Rent", @"Share"]];
self.transactionTypePicker = [[DownPicker alloc] initWithTextField:self.transactionTypeField
                                                              withData:self.transactionTypes];

Then, when I selected the DropDown, got this error

*** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[NSMutableIndexSet addIndexesInRange:]: Range {2147483647, 1} exceeds maximum index value of NSNotFound - 1'
*** First throw call stack:
(
    0   CoreFoundation                      0x01bdb1e4 __exceptionPreprocess + 180
    1   libobjc.A.dylib                     0x0195a8e5 objc_exception_throw + 44
    2   CoreFoundation                      0x01bdafbb +[NSException raise:format:] + 139
    3   Foundation                          0x01588b1b -[NSMutableIndexSet addIndexesInRange:] + 123
    4   Foundation                          0x015afbbb -[NSMutableIndexSet addIndex:] + 48
    5   UIKit                               0x00b6d089 -[UIPickerTableView selectRow:animated:notify:] + 233
    6   UIKit                               0x00c85cdf -[UIPickerColumnView selectRow:animated:notify:] + 65
    7   UIKit                               0x0060bb51 -[UIPickerView _selectRow:inComponent:animated:notify:] + 165
    8   UIKit                               0x0060bbdf -[UIPickerView selectRow:inComponent:animated:] + 63
    9   Immogeo                             0x000718f8 -[DownPicker showPicker:] + 568
    10  Immogeo                             0x00071bf1 -[DownPicker textFieldShouldBeginEditing:] + 129
    11  UIKit                               0x00d38dcb -[UITextField canBecomeFirstResponder] + 248
    12  UIKit                               0x00781045 -[UIResponder(Internal) _canBecomeFirstResponder] + 33
    13  UIKit                               0x00780017 -[UIResponder becomeFirstResponder] + 242
    14  UIKit                               0x0067b60e -[UIView(Hierarchy) becomeFirstResponder] + 114
    15  UIKit                               0x00d3906a -[UITextField becomeFirstResponder] + 51
    16  UIKit                               0x009bfbff -[UITextInteractionAssistant(UITextInteractionAssistant_Internal) setFirstResponderIfNecessary] + 197
    17  UIKit                               0x009c21d2 -[UITextInteractionAssistant(UITextInteractionAssistant_Internal) oneFingerTap:] + 2640
    18  UIKit                               0x009b64f4 _UIGestureRecognizerSendActions + 230
    19  UIKit                               0x009b5168 -[UIGestureRecognizer _updateGestureWithEvent:buttonEvent:] + 383
    20  UIKit                               0x009b6bdd -[UIGestureRecognizer _delayedUpdateGesture] + 60
    21  UIKit                               0x009ba13d ___UIGestureRecognizerUpdate_block_invoke + 57
    22  UIKit                               0x009ba0be _UIGestureRecognizerRemoveObjectsFromArrayAndApplyBlocks + 317
    23  UIKit                               0x009b07ac _UIGestureRecognizerUpdate + 199
    24  UIKit                               0x0065ba5a -[UIWindow _sendGesturesForEvent:] + 1291
    25  UIKit                               0x0065c971 -[UIWindow sendEvent:] + 1021
    26  UIKit                               0x0062e5f2 -[UIApplication sendEvent:] + 242
    27  UIKit                               0x00618353 _UIApplicationHandleEventQueue + 11455
    28  CoreFoundation                      0x01b6477f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
    29  CoreFoundation                      0x01b6410b __CFRunLoopDoSources0 + 235
    30  CoreFoundation                      0x01b811ae __CFRunLoopRun + 910
    31  CoreFoundation                      0x01b809d3 CFRunLoopRunSpecific + 467
    32  CoreFoundation                      0x01b807eb CFRunLoopRunInMode + 123
    33  GraphicsServices                    0x038f95ee GSEventRunModal + 192
    34  GraphicsServices                    0x038f942b GSEventRun + 104
    35  UIKit                               0x0061af9b UIApplicationMain + 1225
    36  Immogeo                             0x000708aa main + 138
    37  libdyld.dylib                       0x022216d9 start + 1
)

EDIT: I just found out that the problem occurs when there is some text in the Text Field (set in the Storyboard) so, in this lines was where the error shows up.

    //If the text field is empty show the place holder otherwise show the last selected option
    if (self->textField.text.length == 0)
    {
      self->textField.placeholder = self->placeholderWhileSelecting;
    }
    else
    {
      [self->pickerView selectRow:[self->dataArray indexOfObject:self->textField.text] inComponent:0 animated:YES];
    }

Repository Being Maintained?

Hello, is this repo maintained or not? Do you accept pull requests?

Have submitted pull request #53 which resolves issues #35 #37 #38 #40 #41.
Please merge if possible. If the repo is not being maintained transfer it so we can maintain it further.

How to populate with Date or Time

Hi there,

I am using this in a project and so far it's been very easy to use and setup, thanks!

One issue I have however is I want to use it for multiple fields in one view... Some of which are date fields.

Is there an easy way of identifying DownPicker as using a standard (and infinite) dataset such as date or time?

Many thanks!

Liam

Add "set default option" feature

It would be great to add a property to set a default selected option from the dataArray. This way, picker would show a selected option since the beginning.

Installation Problem with CocoaPods

I've install DownPicker using Cocoapods and when I built the project this error has appeared:

error: /Users/ernsferrari/Library/Developer/Xcode/DerivedData/Prueba-cvmgkwpczwcrzkgbqwypmbspepuv/Build/Products/Debug-iphonesimulator/DownPicker/DownPicker.bundle: No such file or directory

The version of DownPicker is 0.1.34

Thank you for your help!

Dropdown Icon Pixelated on iPhone 6

The dropdown icon is only available in standard resolution, which makes it look pixelated on iPhone 6.
We should include the following icons:
downArrow.png (32x24) [Already exists]
[email protected] (64x48)
[email protected] (96x72)

screen shot 2015-05-19 at 14 51 22

I'd be glad to make and test these if you have a large source image I can start with.

Thanks!

James

Localize "Done" button

The "Done" button can't be localized (without modifying the code) because it's hardcoded to that string:

UIBarButtonItem* doneButton = [[UIBarButtonItem alloc]
                               initWithTitle:@"Done"
                               style:UIBarButtonItemStyleDone
                               target:self
                               action:@selector(doneClicked:)];

UIDownPicker how to use?

hi ~I am confused that UIDownPicker example code how to use?
please give me more detail to use,thx

missing CFBundleVersion

Info.plist is missing CFBundleVersion, due to which the app fails to install second time on simulator - please add

<key>CFBundleVersion</key>
 <string>0.1.34</string>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.