tags:

views:

599

answers:

3

Duplicate:

How can i use picker view in iphone application using cocos2d ?

Is it possible to use pickerview in iphone application using cocos2d ? If possible then can i do that in my application.Where i can get this information.If not then what are the other solution for doing this in pickerview.

A: 

I haven't looked into cocos2d at all, but I assume that if you still have access to the UIKit fameworks within your app you should be able to create an instance of UIPickerView.

However, I'm not sure you'll be able to used it the way you're intending without some subclassing or writing your own. The picker view is intended to be used by the user to pick an item from a selection, not to be automatically spun by the app...

Jasarien
A: 

Yes you can use UIKit controls in Cocos2DIPhone.

You just need to attach them directly to the application window.

There are examples in the docs and on the cocos2d message board. Riq is excellent with questions/feedback on the message board there as well.

Genericrich
A: 

I have used the UIImagePicker controller in my application using the steps below:

// 1 - instantiate your picker (in my case UIImagePicker):
pickerController = [[UIImagePickerController alloc] init];
pickerController.sourceType = UIImagePickerControllerSourceTypeCamera;
pickerController.delegate = self;

// 2 - add the picker view as a subview of the actual scene
[[Director sharedDirector] openGLView] addSubview:pickerController.view];

It worked for me but the transition is not animated.