开发者

Showing a view in Navigation Controller after dismissing ZXingWidgetController

开发者 https://www.devze.com 2023-04-11 14:54 出处:网络
I am having problem displaying a view in navigation controller after dimissing ZXingWidgetController. Here are the steps.

I am having problem displaying a view in navigation controller after dimissing ZXingWidgetController.

Here are the steps.

  1. Present ZXingWidgetController modally using [self presentModalViewController:widController animated:YES];
  2. After scan result is returned in delegate (void)zxingController:(ZXingWidgetController*)controller didScanResult:(NSString *)resultString)

dismiss ZXingWidgetController and push a view controller in navigation controller.

[dismiss ZXingWidgetController: [self dismissModalViewControllerAnimated:YES];

Push a view controller in navigation controller:

ParsedResult *parsedResult = [[UniversalResultParser      parsedResultForString:resultString] retain];
self.result = [parsedResult retain];
self.actions = [self.result.actions retain];
ScanViewControlle开发者_运维问答r *scanViewController = [[ScanViewController alloc]
initWithResult:parsedResult forScan:scan];
[self.navigationController pushViewController:scanViewController
animated:NO];
[scanViewController release];

But this results into navigation bar being hidden behind status bar partially.

Please let me know how can I fix this issue?


You might wanna try going to the ZxingWidgetController.m and changing setStatusBarHidden and self.wantsFullScreenLayout to NO

If that doesn't work, try adding the following to YourAppDelegate.m's didFinishLaunchingWithOptions: method :

[[UIApplication sharedApplication] setStatusBarHidden:NO animated:NO];
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号