RETableViewManager icon indicating copy to clipboard operation
RETableViewManager copied to clipboard

REPickerItem not working in swift

Open thankmelater23 opened this issue 9 years ago • 1 comments

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.

thankmelater23 avatar Oct 22 '15 09:10 thankmelater23

Here's how the options should be formatted.

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

aasatt avatar May 25 '16 16:05 aasatt