Nativescript drawer does not render properly in iOS after device rotating - nativescript

I have a NS app which uses a drawer (http://docs.telerik.com/devtools/nativescript-ui/Controls/NativeScript/SideDrawer/overview) as navigation.
One odd thing I noticed is that if rotate the device landscape and then back to potrait, the drawer's main content gets cut to the point that was visible while the device was in landscape mode. This only happens in iOS. It seems that the drawer content does not redraw after rotating back to portrait. If I navigate to another view (where the drawer is loaded again) everything looks good.
Steps to reproduce:
load the view
open the drawer - everything looks good
close the drawer
rotate device in landscape
rotate back in portrait
open drawer - the content is cut up to the point equivalent of the width of the device (the portion that would be visible when the device is in landscape mode)
Has anyone experienced this issue? Any ideas on how to solve it?
Thank you.

Related

Xamarin Forms buttons stop receiving mouse clicks after clicking on SkiaSharp CanvasView on iOS

I use SkiaSharp canvas to draw the main game screen, and then there are various Xamarin.Forms Buttons around the UI. This all works fine on when used directly on iPhone or iPad using a finger. However, when I connect a mouse (e.g., through a MacBook or otherwise), the buttons start working with about 10% chance after mouse-clicking on the SkiaSharp canvas (and not receiving the mouse click events with 90% chance). The SkiaSharp canvas itself works just fine.
If I bring up the iOS app launch menu from the bottom (which probably somehow temporarily exists the mouse navigation on the app), the buttons start working again with the mouse. But if I click the SkiaSharp canvas again with the mouse, the buttons have a high chance of becoming disabled again. If I change to using a finger, all works fine (even if the mouse clicks were not being registered immediately before). However, mouse clicks are not being registered even after touching with a finger, so finger-touching does not reset the issue with the mouse (but bringing up the menu from the bottom does).
We found this bug by testing the iOS game on MacBook Pro (the iOS apps recently came available on the App Store) but the same issue persists also directly with an iPad / mouse combination. It seems to be some sort of an issue between using a mouse (on iPad or on MacBook Pro), SkiaSharp canvas and Xamarin.Forms buttons.
Does anyone know what the root cause of the problem is and what is the workaround?
Not an answer as such, but some more information about reproducing the issue: A simpler repro case may be this small project: https://github.com/jrc14/TraceMatching/ .
Don't worry too much about what it's doing, but note that you're mean to click in the grey Skia canvas in the middle to create 'targets' - and that after you've done that, mouse-clicks are getting lost.
If you run it on a Mac, you'll see that, though the clicks get lost after you've clicked on the Skia canvas, they will start being received again if you click on something else (another app, or the Mac background).
(further edit) - after some noodling around I did find a workaround. If, once you've finished processing the touch action on the SKCanvasView, you reset its EnableTouchEvents property (i.e. set it to false, then back to true again), it seems that the clicks don't get lost any more,

Xamarin iOS Splash Screen

Windows 10, Visual Studio 2019 (16.5.4).
I've been following this example:
https://learn.microsoft.com/en-us/xamarin/ios/app-fundamentals/images-icons/launch-screens?tabs=windows
Which is fairly straightforward. My splash screen is simply a blue background with my logo in the centre. However, I cannot work out how to centralise the logo on every iOS device and both portrait and landscape.
Do I have to create a different Asset or LaunchScreen.storyboard for every device?
The way I am familiar with that you can create a responsive design in iOS is to use the concept of AutoLayout.
But before you start that you should be aware of the basics of designing in iOS
Goodluck
Feel free to get back if you have queries
I cannot work out how to centralise the logo on every iOS device and both portrait and landscape.
In the designer you can grab the dot in the centre of the view and then drag it to the vertical or horizontal lines:
Check https://learn.microsoft.com/en-us/xamarin/ios/user-interface/designer/designer-auto-layout#center-constraints

Xamarin.Forms: Unwanted Behavior of Master-Detail Menu/Hamburger button

I'm running the default Master Detail app for Xamarin.Forms which shows the Menu/Master button on the top left.
And this is how it looks when I rotate it to landscape.
When I drill down into detail page while in Landscape...
Then I rotate the device to portrait mode on this page.
Everything is working as expected until I press back button from this page.
You might see it is missing the Master/menu button(or the hamburger button). Am I missing anything here?
SCREEN RECORDING

Xcode 4 and iPad2 splash screen issue

Thank you for reading this.
I created a brand new project in Xcode 4 (Window based kind) and tried to get the splash screens working.
If I click on the blue icon of my project (top of the project hierarchy) and then click on "Target/Project", I see that I can drag and drop two launch images to use them as splash screens.
My portrait picture is a 768 x 1004 px png file and my landscape picture is a 1024 x 748 png file.
When I drop the portrait picture, everything looks fine but when I do the same with the landscape picture, I have a big yellow exclamation point that appears.
If I hover my mouse pointer long enough on the exclamation point, it says:"
the size of the launch image for iPad in landscape mode does not match
the recommended size of 1024 x 748 pixels
".
Just to be sure, I verified in Photoshop and a mac buit-in application and both do say my image is a png file of 1024 x 748.
I tried another picture and got the same message. I created a new Xcode project and also got the same message.
When I build and run the minimalistic project in the iPad simulator, I get the portrait splash vertically in Portrait orientation (ok) and the portrait splash horizontally in Landscape mode (not ok).
What can I do?
Just for you to know:
When I go to the Project-Info.plist, I do see "Supported Interface Orientations (iPad)" and it has 4 items:
Portrait (Bottom home button)
Portrait (top home button)
Landscape (left home button)
Landscape (right home button)
I also copied manually the 5 following files at the root of the project but it didn't help
Default-Landscape~ipad.png
Default-Portrait~ipad.png
Default-LandscapeLeft~ipad.png
Default-LandscapeRight~ipad.png
Default-PortraitUpsideDown~ipad.png
Whatever I do, it just recognizes the portrait picture and uses them for each orientation...
At this point, my project is very minimal and is just made of an appDelegate "h" and "m" file and a "mainWindow.xib" file, that's it (I didn't edit any of them yet).
Any clue?
Thank you.
Edit: try making the image 748x1024 instead of 1024x748 as suggested here.
From SO question - iPad Launch image landscape:
If you're on Xcode 4.0.2+ then the landscape iPad launch image needs
to be 748 * 1024. This is how it works in one of my apps.
Also, Upgrading to xcode 4.1 will fix the big yellow warning you get even when an image is the correct size.
The warning is also different based on your plist setting for "Status Bar is initially hidden" or not. If it's hidden, then it needs to be 1024x768, it not hidden then 1024x748... etc.

How to make an iOS app support landscape orientation in XCode?

How to make an iOS app support landscape orientation?
How do you make it support both landscape and portrait, where you can just press a button to activate it.
for any new people reading this old post just go to main.storyboard->click on the view controller click on simulated metrics (the fourth icon that pops up, looks kind of like a pentagon belt buckle)
then orientation->Landscape this is for Xcode 5

Resources