我想为我的数据选择器框架设置不同的大小。如何使用数组创建它?
这是我的代码:
if(UIInterfaceOrientationIsLandscape([self.delegateVCtr interfaceOrientation])){
//I want to have different int here for changing size
self.viewOfPicker.frame=CGRectMake(0, 0, 480, 230);
self.pkrView.frame=CGRectMake(0, 44, 480, 216);
self.tBar.frame=CGRectMake(0, 0, 480, 33);
} else {
self.viewOfPicker.frame=CGRectMake(0, 0, 320, 230);
self.pkrView.frame=CGRectMake(90, 28, 160, 216);
self.tBar.frame=CGRectMake(0, 0, 320, 33);
}
- (NSInteger)sizeOfComponentsInPickerView:(UIPickerView *)pickerView {
return sizeOfComponents;
}