正如标题所说,我正在尝试使用这样的二维码 - http://chart.apis.google.com/chart?cht=qr&chs=200x200&chl=044779-A55W6UZD&chld=H|0并将其显示为 UIImageview。我已经搜索过,但在任何地方都找不到答案。请帮忙。我已经尝试过了,但它似乎不起作用
NSData *receivedData = [[NSData alloc] initWithContentsOfURL:[NSURL URLWithString:url]];
UIImage *image = [[UIImage alloc] initWithData:receivedData];
UIImageView * myImageView = [[UIImageView alloc] initWithImage:image];
myImageView.frame = CGRectMake(20, 160, 200, 200);
[self.view addSubview:myImageView];