iphone开发之Picker控件连接过程

来源:互联网 发布:张国荣爱情知乎 编辑:程序博客网 时间:2024/05/22 16:59

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


 

原创粉丝点击