应该很容易找到对吗?在Apple文档中,它列出了各种UI组件的任何默认值?
我试过调用协议的方法:
CGFloat width = [self pickerView:pickerView widthForComponent:0];
......但没有运气。我如何找出这个默认值?
答案 0 :(得分:1)
我之前没试过,但也许......
viewForRow:forComponent: http://developer.apple.com/iphone/library/documentation/uikit/reference/UIPickerView_Class/Reference/UIPickerView.html#//apple_ref/occ/instm/UIPickerView/viewForRow:forComponent:
然后从UIView返回
获取宽度