oOOMIAO
oOOMIAO
2013-06-28 08:29

UIImageView不加载图片

  • uiimageview
  • iphone

使用ImageView从url加载图片失败:

   pdfView.hidden=NO;
   webView.hidden=NO;
   pictureImageView.hidden=NO;
  pdfView.backgroundColor=[UIColor clearColor];
  doneButton = [[UIBarButtonItem alloc]initWithTitle:@" Done " style:UIBarButtonItemStyleBordered target:self action:@selector(doneButtonClick)];            
  self.navigationItem.leftBarButtonItem =doneButton;
  webView.backgroundColor=[UIColor clearColor];


    NSLog(@"File Name is %@",fileName);

    NSLog(@"Enterning in the ImageSection");

    NSString *ImageURL = fileName;
    NSData *imageData = [NSData dataWithContentsOfURL:[NSURL URLWithString:ImageURL]];
        pictureImageView.image = [UIImage imageWithData:imageData];  

同时,如果我要从本地读取也不显示:

  pictureImageView.image=[UIImage imageNamed:@"starblue.png"];

请高手帮忙,谢谢

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

2条回答

为你推荐