Problem with QPickerElement

88 views
Skip to first unread message

Hugo Doria

unread,
Nov 7, 2013, 8:05:49 PM11/7/13
to quick...@googlegroups.com
Hi,

I am having a problem with QPickerElement. It's hard to select the
first item from the picker. Heres how I am creating a QPickerElement:

QPickerElement *myElement = [[QPickerElement alloc]
initWithTitle:@"Title" items:@[arrayWithOption1AndOption2] value:nil];

When the picker appears on screen i am not able to select the first
item ("Option 1"). I need to scroll to "Option 2" then switch back to
"Option 1".

Suggestions?

-- Hugo Doria

Andrew Evans

unread,
Apr 10, 2014, 12:11:01 AM4/10/14
to quick...@googlegroups.com
You can force the first option to be initially selected, which I think achieves what you want (or at least gets the picker out of that weird state where it looks like the first element is selected when it's really not.  To do this, set a value on init (instead of passing in nil), like so:

QPickerElement *myElement = [[QPickerElement alloc] 
initWithTitle:@"Title" items:@[arrayWithOption1AndOption2] value:"Option 1"]; 
Reply all
Reply to author
Forward
0 new messages