Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

Bug? MasterDetailPage set IsPresented while changing tab

$
0
0

I'm using a TabbedPage where a certain action in one tab will cause the app to change its current tab. All tabs are MasterDetailPages. During this change, if an iOS device is in portrait, the Detail view will not automatically slide away or change to that of the new page. This means that you're stuck with the old detail view, and as soon that you tab somewhere to make it slide away, an error occurs.

In order to fix this, I'm trying to set the IsPresented of the page I'm navigating away from, however, this also causes the same error.

My question is: Does anyway know of a workaround? I was thinking of waiting for the navigation to end before changing the tab, but there doesn't seem to be any way to do this.

The error message I'm receiving is:
Objective-C exception thrown. Name: NSInvalidArgumentException Reason: -[UIPopoverController _presentPopoverBySlidingIn:fromEdge:ofView:animated:stateOnly:notifyDelegate:]: Popovers cannot be presented from a view which does not have a window.
Native stack trace:
0 CoreFoundation 0x087eba84 exceptionPreprocess + 180
1 libobjc.A.dylib 0x08b55e02 objc_exception_throw + 50
2 CoreFoundation 0x087eb9ad +[NSException raise:format:] + 141
3 UIKit 0x01b3fc83 -[UIPopoverController _presentPopoverBySlidingIn:fromEdge:ofView:animated:stateOnly:notifyDelegate:] + 245
4 UIKit 0x01b48e13 -[UIPopoverController _dismissPopoverAnimated:stateOnly:notifyDelegate:] + 322
5 UIKit 0x19220248 -[UIPopoverControllerAccessibility _dismissPopoverAnimated:stateOnly:notifyDelegate:] + 73
6 UIKit 0x01b46151 -[UIPopoverController dismissPopoverAnimated:] + 475
7 UIKit 0x018dd1dd -[UISplitViewController _dismissMasterViewController:] + 172
8 UIKit 0x018db785 -[UISplitViewController _changeToDisplayMode:forCurrentOrientationOnly:] + 595
9 UIKit 0x018dbcba __51-[UISplitViewController _triggerDisplayModeAction:]_block_invoke + 51
10 UIKit 0x01318d09 +[UIView(UIViewAnimationWithBlocks) _setupAnimationWithDuration:delay:view:options:factory:animations:start:animationStateGenerator:completion:] + 608
11 UIKit 0x013192b9 +[UIView(UIViewAnimationWithBlocks) animateWithDuration:animations:] + 115
12 UIKit 0x018dbc74 -[UISplitViewController _triggerDisplayModeAction:] + 166
13 Foundation 0x00aafd71 __NSFireDelayedPerform + 442
14 CoreFoundation 0x0873d576 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION
+ 22
15 CoreFoundation 0x0873cf72 __CFRunLoopDoTimer + 1250
16 CoreFoundation 0x086fb25a __CFRunLoopRun + 2202
17 CoreFoundation 0x086fa706 CFRunLoopRunSpecific + 470
18 CoreFoundation 0x086fa51b CFRunLoopRunInMode + 123
19 GraphicsServices 0x0b02f664 GSEventRunModal + 192
20 GraphicsServices 0x0b02f4a1 GSEventRun + 104
21 UIKit 0x0125a1eb UIApplicationMain + 160
22 ??? 0x185661c0 0x0 + 408314304
23 ??? 0x18565fb8 0x0 + 408313784
24 ??? 0x18564138 0x0 + 408305976
25 ??? 0x18563e74 0x0 + 408305268
26 ??? 0x18564004 0x0 + 408305668
27 ProApp.iOS 0x002b236b mono_jit_runtime_invoke + 715
28 ProApp.iOS 0x00350b1f mono_runtime_invoke + 127
29 ProApp.iOS 0x00355d11 mono_runtime_exec_main + 401
30 ProApp.iOS 0x00355ac7 mono_runtime_run_main + 711
31 ProApp.iOS 0x0021257d mono_jit_exec + 93
32 ProApp.iOS 0x0043f731 xamarin_main + 2497
33 ProApp.iOS 0x001bb7b1 main + 113
34 libdyld.dylib 0x0905fa21 start + 1
35 ??? 0x00000003 0x0 + 3

Stacktrace:
at ObjCRuntime.Runtime.ThrowNSException (IntPtr ns_exception) [0x00000] in /Users/builder/data/lanes/2320/bae2cdbe/source/maccore/src/ObjCRuntime/Runtime.cs:234
at ObjCRuntime.Runtime.throw_ns_exception (IntPtr exc) [0x00000] in /Users/builder/data/lanes/2320/bae2cdbe/source/maccore/runtime/Delegates.generated.cs:100
at (wrapper native-to-managed) ObjCRuntime.Runtime:throw_ns_exception (intptr)
at (wrapper managed-to-native) UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
at UIKit.UIApplication.Main (System.String[] args, IntPtr principal, IntPtr delegate) [0x00005] in /Users/builder/data/lanes/2320/bae2cdbe/source/maccore/src/UIKit/UIApplication.cs:77
at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00038] in /Users/builder/data/lanes/2320/bae2cdbe/source/maccore/src/UIKit/UIApplication.cs:61
at ProApp.iOS.Application.Main (System.String[] args) [0x00008] in /Users/Ronnie/Work Mac/ProApp/iOS/Main.cs:17


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>