Add iPhone XR support to existing iOS app in Xcode 10 - autolayout

I have an iOS application that is working fine in an iPhone X or XR the only problem is that i see the black areas on top and bottom so the app is not taking the hole of the screen.
Im using Auto Layout option in the Storyboard.
I also was reading that you can fix this by adding a Launch Image specific size to the assets but I just opened my assets and I don't see a new space for iPhone X or XR images.
Im I doing something wrong?

If you are using a LaunchScreen.storyboard with a ImageView you need to uncheck "Use Safe Area Layout Guides" or set Up and Bottom constraints to superview instead of Safe Area.

Related

Broken mobile responsiveness in iOS only

I'm experiencing a weird issue with the mobile responsive layout of a website.
The address is https://melec.vercel.app/
On desktop using dev tools > responsive, it works correctly, also on any android device you get the correct mobile experience but in iOS devices (tested on 2 iphones) the website renders incorrectly, it seems to have the double of the actual available screen width.
For reference I'm using tailwindcss, tailwindui and nextjs.
In this image you can see the scroll bar for horizontal movement.
Here you can see how I can freely move horizontally, this doesn't happen on dev tools or android devices.
Also when I press the mobile burger the whole layout shrinks a bit.
it is because the top part "flex-shrink-0 flex items-center".
I entered a "max-width: 100%;".

How to set LaunchScreen image width constraint to superview in xamarin iOS project storyboard file?

I am implementing a splash screen for my app. I just came to know about storyboard constraints to support multiple devices. Basically, I feel it very difficult to understand it as a beginner in this, also I see there is no apt documentation in xamarin also. I want to know the steps to set an imageview width to its super view (View controller).
I see what I should do from here, Visual studio Xamarin iOS launchscreen storyboard layout. But, how do I add those constraints, totally no idea..?! Particularly imageview width and height to superview, trailing and leading
Now, I can only know how to set the constraints in designer by dragging, I'v only learnt to center the image to super view in X and Y (Horizontally and vertically). There is no button to add constraints. How to add leading and trailing constraints? I'm using Visual Studio 2017 for Windows
I got it working.
Step 1: Open storyboard file with lowest screen resolution device set (iPhone 4s) and drag & drop an imageview to fill the view controller.
Step 2: Set the uiimageview source from resources/image assets.
Step 3: Click on the image -> Properties Tab -> Layouts section. You will see like this
Step 4 : Properties -> Layout -> Under View group, there is title called Arrange, there is a autosizing box and example box.
Step 5 : You should click all the I-bars and lines in the center to make it red like below to fill the width (you can see that reflecting in the example box as you click)
Now, SAVE and then switch to other devices, you should have that UIImageview filling the device's height and width.
This will be very useful for important UI auto designs like splash screen.

stagewebview on ios - how can I prevent vertical movement of the SWV object?

Im using flex (air 3.9) and have a question about using fullscreen stagewebview on ios platform (noticed it under ios6 and also under the current ios7).
when I have a full screen stagewebview and have web content loaded, I notice that Im able to tap and 'pull' or 'drag' the stagewebview up / down in sort of a 'pull down to refresh' sense where its somewhat elastic in nature and when released it snaps back into the original / correct position.
it actually still occurs when the stagewebview is NOT full screen I just noticed so no matter the size, stagewebview on ios seems to allow the user to 'move' it vertically up or down.
Is there a way to specify that the stagewebview should stay in a fixed position and NOT move vertically?
On Android platform it does not do this at all.
You can use this:
$('body').bind('touchmove', function(e){e.preventDefault()});
Works perfect for me

Size of iPad Simulator is too big in XCodes 4.3.2

Now i am using macbook pro with 13 inches.
Yesterday i upgraded XCodes version to 4.3.2.
In that iPad Simulator is too big and iPad Retina Simulator is also too big.
It's not fix my screen.
iPad Retina Simulator size is take all of my screen and it's can only show iPad's dock.
I can't see overview iPad screen.
I always scroll down and up to test.
When i change Simulator's Window > Scale into 75 %, It's still too big.
50% is too small and can't see anything clearly.
When i develop with XCodes 4.2 , iPad Simulator is fix size and okay to test.
I want iPad simulator size fix my screen.
Is there anyways?
If my question is out of question, so sorry for that.
Thanks.
Maybe it's because the iPad 3 have a really large resolution (2048x1536). That's more than most computer screens. You will need to zoom out to display the entire screen just because of this, or you must get a larger (higher resolution) screen for your computer if you don't want to scale the program.
The reason for this is that the iPad 3 have much tighter pixel density than most other computer screens so each pixel on the iPad is smaller than each pixel on your computer screen.
What you can do is make the simulator start by suppressing the title bar and your dock if it happens to be shown.
Follow these steps, please be responsible and back-up your files before editing anything as I do not take responsibility for things going wrong.
Before you start close any running simulators.
In Finder Press CMD+SHIFT+G and enter the folder /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone Simulator.app/Contents/; this folder may differ for you depending on your location of the simulator/SDK.
Backup the file called Info.plist
Copy Info.plist to your home directory.
Double click Info.plist in your home directory. You will be presented with the plist editor.
Select the first entry called Information Property List and click the plus (+) sign immediately to the right.
Enter Application UI Presentation Mode into the Key field of the new entry, tip: it will auto populate after typing Application UI.
Enter 4 in the Value field, this will then change to All Suppressed.
Save and close the file.
Replace the original plist file with this new one, remember to back the original up first.
Now when you run the simulator it will not show the menu bar when it becomes active. The reason you needed to copy the file to your home directory is because you do not have write permission to it. It also stops you mucking it up and preventing the simulator running while editing the file.
You can apply this trick to any application by finding it's plist file, thus I also change Xcode.app to do this too.
You will need to scale the simulator to 75%, however it will now be almost the full height of the screen with no loss of the iPad window.
Now It's more flexible with Xcode 9- Simulator. You can pick & drag any corner or simulator to resize it and set it according to your requirement.
Look at this snapshot.
https://apple.stackexchange.com/questions/205865/ios-simulator-screen-size-not-equal-to-window-size

Is there a way to display iPad Simulator fullscreen?

does anyone know if there is some way (Applescript, secret .plist defaults setting...) to view an iPad simulator window on fullscreen (or borderless)? It would be very handy to show it on a second 1024x768 display at native resolution. The simulator's vertical size when in portrait is simply too high even for a fullHD monitor... the border is too thick and the window cannot be moved offscreen above the upper edge.
Copy the Info.plist file that resides at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone Simulator.app/Contents/Resources/Devices/iPad.deviceinfo
onto your desktop. This folder is write protected and even with root enabled it crashes xcode if you try to edit it from here.
Double click on the file and edit the plist in Xcode change the width variable to 1000 and the height variable to 1800. (I'm running this at 1366x768 and these settings worked. tweak if you need to) Save it.
Copy your edited plist file and paste it back into the original folder and replace the existing file. Run your app. Rotate the device to landscape orientation.
Bask in the glow of a full screen window running ios.
Selecting:
Window -> Scale -> 100%
Will make twice bigger than default
Maybe this will help?
https://plus.google.com/u/0/115321914207029284487/posts/gcqBJej1g4R
I guess, you can edit the frame.png to make the border even smaller. Maybe even nonexistent.

Resources