我想修复 ios 中的 Horizontal UIPickerView 代码
我找到了水平 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>
.
.
.
}
我想修复错误
I found Horizontal UIPickerView . but this code is not working .
(//this: )is error area.
@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>
.
.
.
}
I would like to fix error
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试:
Try: