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

REPickerItem not working in swift #242

Open
thankmelater23 opened this issue Oct 22, 2015 · 1 comment
Open

REPickerItem not working in swift #242

thankmelater23 opened this issue Oct 22, 2015 · 1 comment

Comments

@thankmelater23
Copy link

This piece of code does not work in swift 2/xcode 7.0/cocoapods version 1.6

var pickerExmp = REPickerItem(title: "Brands", value: ["one"], placeholder: "Brands", options: ["one"])

  • (NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component
    {
    return [[self.item.options objectAtIndex:component] count];//
    }

//Returning error code:

2015-10-22 02:00:19.690 MyFitZ[5489:103813] -[Swift._NSContiguousString count]: unrecognized selector sent to instance 0x1566efb50
-[Swift._NSContiguousString count]: unrecognized selector sent to instance 0x1566efb50

I've taken care of the requirements and I can't get the picketItem to work. Please help last piece needed.

@aasatt
Copy link

aasatt commented May 25, 2016

Here's how the options should be formatted.

let options : [AnyObject]! = [ ["Male", "Female"] ]

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

2 participants