我是目标 C 的新手。我试图在单击按钮时从当前视图加载新视图,但是当我单击按钮时它执行代码但什么也不做,即不加载新的视图控制器。以下是我的代码...
- (void)zxingController:(ZXingWidgetController*)controller didScanResult:(NSString *)resultString {
[self dismissModalViewControllerAnimated:YES];
//Display QRCode in string....
NSLog(@"Result::::%@",resultString);
[_qrCodeParser initWithQRString:resultString];
int i=[_qrCodeParser parseQROCode];
sharedInstance=[SharedInstance sharedInstance];
NSLog(@"%@",sharedInstance._medicineData);
if (i==0) {
_detailView= [[AlarmViewController alloc] initWithNibName:@"AlarmViewController" bundle:nil];
[self presentViewController:_detailView animated:YES completion:nil];
}
}