导入 libqrencode文件,很小的 添加 #import "QRCodeGenerator.h" @property (strong , nonatomic) UIImageView* qRImageView; - (void)viewDidLoad { [super viewDidLoad]; self.qRImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 320, 400)]; [self.view addSubview:self.qRImageView]; } -(IBAct