您的位置:首页 > 其它

将网上图片显示到 View 上

2012-01-08 02:01 155 查看
NSURL *url=[NSURLURLWithString:@"http://demo.gnway.com:8000/Icons/5.ico"];

NSData *data=[NSData dataWithContentsOfURL:url];

UIImage *tmpimage=[[UIImage alloc] initWithData:data];

UIImageView *imageview =[[UIImageView alloc]initWithFrame:CGRectMake(100,

100, 100, 100)];

imageview.image=tmpimage;

[self.view addSubview:imageview];
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: