0
我发现了Horizontal UIPickerView。但是这个代码不起作用。我想修复ios中的Horizontal UIPickerView代码
(// this:)是错误区域。
@property (retain, nonatomic)UIPickerView * myPickerView;
@property (retain, nonatomic) NSArray *pickerViewArray;
#import "ViewController.h"
@implementation ViewController
@synthesize myPickerView;
@synthesize pickerViewArray;
-(void)loadView{
// Write code to create self.view
// Then...
pickerViewArray = [[NSArray arrayWithObjects:
@"John Appleseed", @"Chris Armstrong", @"Serena Auroux",
@"Susan Bean", @"Luis Becerra", @"Kate Bell", @"Alain Briere",
nil] copy];
myPickerView = [[UIPickerView alloc] initWithFrame:CGRectZero]; //this:thread1 error
myPickerView.delegate = self;
//this: Passing "ViewController 'const_strong'to parameter of incompatible
//type'id<UIPickerViewDelegate>
.
.
.
}
我想修复错误