I am trying to follow some tutorials online. Every time i run the iOS simulator my xcode seems to minimise and focus goes to the simulator on the desktop
Is it possible to stop this and have the simulator load on top of the Xcode window?
Thanks
Focus will switch over but Xcode itself doesn't minimise. However, if you're running Xcocde full screen (you have clicked on the <-> arrow in the top right of the screen) then you will switch to a different screen - this is standard behaviour for all maximised apps. Clicking on the green full screen icon in Xcode will make the window take up all available space but without taking a separate screen, which will give the behaviour that you want -- though note this is for 10.9; I seem to recall that clicking the green button on later versions of OSX may automatically trigger the full/separate screen mode.
Related
My project has several Picker controls with .pickerStyle(SegmentedPickerStyle()). Something in the project (or, perhaps, on my iPad) has evidently changed, and now all of the pickers "pop" when selected, rather than the selection highlight sliding to the new selection -- but only on the actual device. In the simulator, the selection slides as expected. Even a plain vanilla picker with code straight out of Hacking With Swift exhibits this behavior on my device, so it seems that the issue is somewhere that has global effect, rather than in the code for an individual picker itself. (That "vanilla" code, along with all my other Picker controls, look normal in the Simulator.)
Other UI elements animate normally on the device, so it isn't a blanket "turn off all animations" setting, but the various segmented pickers are all affected, even though they reside in different parts of the project. (And, yes, the project is way, way too big to post all of the code -- but "the code" works as expected in the simulator.)
What are the sorts of things -- in a project or in a device's settings -- that can globally cause all segmented Pickers in a project to stop animating (though only on the device itself)?
What I'm seeing on the iPad:
What I'm seeing on the Simulator (i.e. what I expect to see):
I recognized the simulator vs device distinction when I created a Simulator to exactly duplicate my iPad (Air gen 3, iOS 14.2), and the simulator shows the picker sliding (i.e. the bottom screen capture). But the device shows it popping (the top screencap). This behavior persists after deleting the app on the iPad, rebooting the iPad, and installing the app again. So perhaps the 'guilty' setting is on the device rather than in the project???
What settings, in the project or the device, could cause this change in behavior?
Possibly related:
Broken animations in iOS 14
Not SwiftUI, but device vs simulator discussion
Example of "OK on simulator, not OK on device" (though with different specific things going on)
Another "ran on simulator, not on device" issue... does the Picker use the same problematic Spring animation???
(( And yes, there are plenty of cases where the simulator performs poorly & the device performs well... that's understandable. This case is one where things are the other way around: what works on the simulator does NOT work as advertised on the device. ))
This is caused by the Reduce Motion setting on your physical device. This can be found under Settings -> Accessibility -> Motion.
When reduced motion is disabled, the segmented picker has a slide animation.
When reduced motion is enabled, the segmented picker does not have the slide animation.
I would like to make screenshots of my app in IOS-Simulator. This works fine with CMD-S, but I have always black parts in my screen, because the windows is not autosized to the simulated devices screensize.
Is there a way to autosize the window to fit with the screensize of the simulator ?
Screenshot:
The white part is the content of the device. The black is obsolete and is a window from the MAC. When taking the screenshot from this, I still have to cut out the content to have a good screenshot.
This used to happen in earlier to iOS SDKS when you don't set a launch images for all devices.
In your case, I think you don't have the launch screen file set. this can be solved by setting that file at general section in the target's settings.
Alternatively, set launch screen images for all devices.
Check my answer here.
One more thing to try: At the top bar in simulator. choose the
Window menu then Scale and play with those values.
I solved it the following way, but I don't know what was the reason.
I removed the launchscreen as hasan83 suggested. This did not the trick yet.
I restarted the MAC
I started XCode ("Xcode"->"Open Developer Tools"->"IOS Simulator")
I started the ios simulator without starting my app. -> MAC-Windows fit with the simulated device screen
I started my app and now it looks as intended.
Thanks for helping to all involved people !
My iOS Simulator only show the content as a part of the screen. How can I fix it? I'm using XCode 6.3.1. Thanks
You just need to restart it. It can happen sometimes.
Force close simulator and start it again!
I am including this response for those, who like me, are seeking an solution for this problem after upgrading to Xcode 8.
The simulator began using only a portion of the display, as described in the question, when testing against iOS 8.x. The symptoms were that 1/4 of the display was showing if the window scale was set to 50%, 1/9 would show if the scale was set to 33%, etc. The entire display would show only if the scale was set to 100%, which is a real pain when using an iPad simulator.
The solution for me was to turn off "Optimize Rendering for Window Scale" under the "Debug" menu, which first seems to have appeared in Xcode 8. The 8.x simulators displayed properly after that.
Looking at the image..
I think it has something to do with the resolution/scale of the simulator.. I dont use Xcode 6.3.1 though...
since it's 5s the screen resolution/scale is x2.. so instead of 320x568 it must be 640x1136..
why dont you use the device frame rect to fill the screen? something like self.view.frame ?
its hard to guess what causing your problem,show us something that may help.. :)
Visit for more details:
iPhone Simulator Quarter or Top Left part of the screen[Fixed]
Watch the video from this link: iPhone Simulator - Quarter of the screen [Fix]
Step 1: “Force Quit” the iOS Simulator
Step 2: Open “Spotlight Search” and type “Chameleon Wizard” (if you installed Chameleon Bootloader)
Step 3: In that popup window, click on “org.chameleon.Boot”
Step 4: Uncheck display_0, Graphics Mode(Clear that Dropbox also), cpus=1, npci=0x3000, dart=0. Below shows an image with checked items those mentioned here. Just uncheck it all.
Step 5: Restart your Mac and try.
Not sure what happened, but I recently updated Xcode 6, and now the iOS Simulator contents does not fill the whole screen. And yes, I checked window -> scale options.
Click iOS Simulator in the menu bar, then select Reset Content and Settings. I often find that when I update Xcode this is a good idea as problems like yours arise.
The iPhone 6 Plus has a "one handed mode" that Apple describes as "Keep everything within reach" on their iPhone design page.
The mode is enabled by double touching (but not pressing) the home button. When enabled the screen shrinks to roughly half its normal height.
Is there a way to enable this mode in simulator for testing how it looks and transitions?
I'm running Xcode 6 GM and have not been able to uncover anything. Worst case, can someone post the exact dimensions on device so it can be emulated via the resizable iPhone simulator?
Update: According to John Gruber's review, the feature is available on the iPhone 6 Plus and 6, and is not a "mode" so much as a momentary shortcut. Maybe since it only lasts for one tap it won't be important to do extensive testing. He shared a screenshot showing the corresponding size difference:
The simulator doesn't seem to have this capability, but it doesn't matter since it just moves your app's entire view down and uses the home screen background to fill the top. Devs don't need to do anything to their apps in regards to it.