开发者

UIPickerView selected item's frame

Is there a way to get the frame of the currently selected UIPickerView's item?

I tried the following (as suggested below) but I always get a nil back:

-(void) pickerView:(UIPickerView *)pickerView 
      didSelectRow:(NSInteger)row 
       inComponent:(开发者_运维问答NSInteger)component{


    UIView *selected = [pickerView viewForRow:row forComponent:component];
}


UIView *view=[picker viewForRow:[picker selectedRowInComponent:1] forComponent:1];


CGRect viewframe=[view frame];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜