Dear Fuse-Team
Sadly (or gladly ^^) I found a bug with a nested navigation via PageControl and a MapView on a subpage
To demonstrate the bug, I created a little test app
I only colored one site red (the first one), to which I will navigate again at the end resulting in the bug, displaying a Map from a different subpage ontop of the red oneโฆ
To follow the navigation process, just keep clicking on the text-buttons you see
Code unoproj:
{
"RootNamespace":"",
"Android": {
"Geo": {
"ApiKey": "---YOUR_KEY_HERE---"
}
},
"Packages": [
"Fuse",
"Fuse.Maps",
"FuseJS"
],
"Includes": [
"*.ux"
]
}
Code ux:
<App>
<PageControl ux:Name="MainNavigation" Active="Page1" Interaction="None">
<NavigationMotion GotoType="SmoothSnap" GotoDuration="0.08" />
<Page ux:Name="Page1" Background="#F00">
<Text Value="Page 1" Alignment="Center">
<Clicked>
<Set MainNavigation.Active="Page2" />
</Clicked>
</Text>
</Page>
<Page ux:Name="Page2" >
<PageControl ux:Name="SubNavigation" Active="subpage2" Interaction="None">
<NavigationMotion GotoType="SmoothSnap" GotoDuration="0.08" />
<Page ux:Name="subpage1">
<Text Value="Sub-Page 1" Alignment="Center">
<Clicked>
<Set SubNavigation.Active="subpage1" />
</Clicked>
</Text>
</Page>
<Page ux:Name="subpage2" >
<DockPanel>
<Fuse.iOS.StatusBarConfig Style="Dark" />
<StatusBarBackground Dock="Top"/>
<NativeViewHost>
<MapView ux:Name="panel2" Margin="0,0,0,0" Height="100%" Latitude="50.9303675" Longitude="6.950763000000052" Zoom="12" ShowMyLocationButton="true" >
</MapView>
</NativeViewHost>
<Panel Dock="Bottom" Height="47">
<Text Value="Sub Page 2" Alignment="Center">
<Clicked>
<Set SubNavigation.Active="subpage3" />
</Clicked>
</Text>
</Panel>
</DockPanel>
</Page>
<Page ux:Name="subpage3">
<Text Value="Sub Page 3" Alignment="Center">
<Clicked>
<Set MainNavigation.Active="Page3" />
</Clicked>
</Text>
</Page>
</PageControl>
</Page>
<Page ux:Name="Page3">
<Text Value="Page 3" Alignment="Center">
<Clicked>
<Set MainNavigation.Active="Page1" />
</Clicked>
</Text>
</Page>
</PageControl>
</App>
Specs:
- Fuse_ver: 0.23.0 build 7041
- OS: OSX 10.11.6
Xcode-Output after clicking the first Text-button (app keeps running - No further logs on any other buttonpresses):
2016-08-11 04:05:53.462 MapViewBug[1706:848618] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want.
Try this:
(1) look at each constraint and try to figure out which you don't expect;
(2) find the code that added the unwanted constraint or constraints and fix it.
(Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
(
"<NSAutoresizingMaskLayoutConstraint:0x4627c2b0 h=-&- v=-&- MKMapView:0x462c2ec0.height == UIView:0x462c2db0.height>",
"<NSLayoutConstraint:0x462c8210 UILayoutGuide:0x462c8100'Edge Insets'.top == MKMapView:0x462c2ec0.top + 20>",
"<NSLayoutConstraint:0x462c83c0 UILayoutGuide:0x462c8100'Edge Insets'.bottom == MKMapView:0x462c2ec0.bottom>",
"<NSLayoutConstraint:0x41eebf50 'UIView-Encapsulated-Layout-Height' V:[UIView:0x462c2db0(0)]>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x462c83c0 UILayoutGuide:0x462c8100'Edge Insets'.bottom == MKMapView:0x462c2ec0.bottom>
Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
I hope that I put everything you need together, if not please tell me
Sorry for the long post
Gratefully
Blade
EDIT: Here is the visual proof