views:

128

answers:

1

Hi

I have been building a UIPickerView with 2 components(wheels) and was wondering if there is a way to space them out a bit, horizontally?

I haven't been able to find anything in either definition or documentation.

Hope someone knows how to solve this one:)

Thanks

A: 

I'm not where I can try this out and I don't know what it would look like if possible but can you insert a component in between the two with the desired width then in the code behind make that one component hidden?

jan
Hi JanThat is actually not a bad idea at all:)I just have no idea as how to "sniff" out the particular component view I need. This yields ≈ 20 zeros: for(UIView *v in intervalPicker.subviews) { NSLog(@"%i", v.tag); }Thanks for the suggestion, if someone know how to access the individual components Im sure it could work
RickiG
I tried setting all the picker.subviews to hidden. This results in everything but the components to be hidden:) that is also a cool effect, just not what I need right now. Hmm seems strange that the components should not be subviews of the Picker?
RickiG
I didn't think you'd be able to do it in the actual code but maybe if you view the nib as plain text you could figure something out in there. When I get home I'll check it out, no access to a mac here.
jan
I ended up putting a narrow component wheel in between my two other wheels and then working around it in the delegate methods. As I have looked at it for some days now, I actually think this is better than two separate wheels:)
RickiG
I couldn't find a way to make the component invisible. I'm glad this works for you anyway. I'm hoping at some point someone will come across this and post how to make a component invisible if possible or how to separate two components.
jan