タイトルにあるように、 http: //chart.apis.google.com/chart?cht=qr&chs=200x200&chl=044779-A55W6UZD&chld=H|0 のような qr コードを取り、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];