2013-05-10 52 views
0

插入图像前uipickerview enter image description here如何弹出文本图像中uipickerview

插入图片后在uipickerview

enter image description here

- (UIView *) pickerView:(UIPickerView *)pickerView viewForRow:(NSInteger)row 
      forComponent:(NSInteger)component reusingView:(UIView *)view { 
    CGRect imageFrame = CGRectMake(0.0, 0.5, 255, 250); 
    UIImageView *label = [[UIImageView alloc] 
          initWithFrame:imageFrame]; 
label.backgroundColor=[UIColor scrollViewTexturedBackgroundColor]; 
    [label sendSubviewToBack:pview]; 

[pview sendSubviewToBack: label]; 
    [pview addSubview:label]; 


return label; 

} 

回答

0

在你的代码写了这个: -

[label sendSubviewToBack:pview]; 

[pview sendSubviewToBack: label]; 

我认为你是在这里做什么错误..

你只需要使用这样的: -

[label sendSubviewToBack:pview]; 
[label addSubview:pview]; 

删除此

[pview sendSubviewToBack: label]; 

,将工作fine..if不会随意问..享受..

+0

你只是分享您的代码,我将编辑和送你回去.. – Shivaay 2013-05-10 06:32:44

+0

https://skydrive.live.com/?cid=A0B31648B2E37C13&id=A0B31648B2E37C13!106 @json它我的文件 – Harshad 2013-05-10 07:00:39

+0

@Harshad给我一点时间.. – Shivaay 2013-05-10 07:22:35