尝试使用按钮而不是pickerview创建自定义视图。我遇到的问题是自定义视图正在显示而不是按钮
UIView *view=[[[UIView alloc]initWithFrame:CGRectMake(0,200,320,300)]autorelease];
view.backgroundColor=[UIColor grayColor];
UIButton *myButton = [UIButton buttonWithType:UIButtonTypeCustom];
[myButton addTarget:self action:@selector(dismissView:) forControlEvents:UIControlEventTouchUpInside];
myButton.frame = CGRectMake(50, 300, 60, 50);
[myButton.layer setMasksToBounds:YES];
[myButton.layer setCornerRadius:10.0f];
[myButton setTitle:@"English" forState:UIControlStateNormal];
myButton.backgroundColor = [UIColor whiteColor];
[self.view addSubview:view];
[self.view addSubview:myButton];
知道我在这里缺少什么。