您的位置:首页 > 其它

iphone开发之Picker控件连接过程

2012-10-21 20:05 465 查看
1.将File's Owner上的doublePicker输出口连接到选取器。

2.将选取器视图上的DataSourceh和Delegate连接到File’s Owner(使用连接检查器)

3.将按钮的Touch Up Inside事件连接到File‘s Owner上的buttonPressed操作(使用连接检查器)

.h文件关键代码

#import <UIKit/UIKit.h>

@interface BIDDoubleComponentPickerViewController : UIViewController
<UIPickerViewDelegate,UIPickerViewDataSource>

@property (strong,nonatomic) IBOutlet UIPickerView *doublePicker;
@property (strong,nonatomic) NSArray *fillingTypes;
@property (strong,nonatomic) NSArray *breadTypes;

-(IBAction)buttonPressed;

@end
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: