I have started working with SwiftUI Demo.
But I am not able to scroll the Preview canvas in Xcode.
Yes there is button for zooming like - 100 + .
I have seen a video where person is scrolling this canvas during the tutorial
is there any option in Xcode to enable scrolling in preview canvas ?
Seems to be a trackpad vs mouse wheel issue. Try scrolling with the trackpad, it should work until Apple gets this bug patched. Haven't tried with a bluetooth trackpad, might be worth looking into.
On my MacBook Pro (Big Sur, 11.2.3), I place two fingers on the trackpad and move them up and down to scroll between previews in the canvas of Xcode 12.5 beta 3.
Hope that helps. I'm new to Mac to perhaps this was just obvious to everyone else.
Related
Is there is any way to add mouse and trackpad's gesture like scrolling in simulator screen.
Yes, but you would have to create a Mac app that got these events and then translated them to what the simulator was expecting
This project:
https://code.google.com/archive/p/accelerometer-simulator/
Tries to do something similar but with the accelerometer (since MacBooks have one).
This answer links to some tutorials that show you how to do what that project is doing: https://stackoverflow.com/a/16558215/3937
I just recognized that I can see thru the iOS Simulator if an UIView is defined with (semi-) transparent content. But I can not make a screenshot of it, on the screenshot the effect is gone.
The (custom) navigation bar on top has alpha set to CGFloat(0.9).
Here a screenshot taken with an iPhone 6:
Zoom in and you can see thru the simulator window on Xcode. I assume this is a bug, or is it intended behavior of the OS X transparency effects? If it is intended, can I turn it off?
Ok, I have found the problem. Actually it is not a transparency effect but a display problem. I am using an iMac 27inch with an IPS LCD display, which suffers heavily from "screen burning". Xcode is standing on this position for hours so it burned in into the display. That's why I can not make a screenshot - it is a hardware problem.
https://discussions.apple.com/thread/5255653?tstart=0
Yeah this is going to be a hardware / screen problem. Should not translate to your app.
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.
We have a project that behaves as desired when built using Xcode 5.1.1 (iOS sdk 7.2), but when build using Xcode 6.2 (iOS sdk 8.2) there is a rotation rendering issue on the iPad. On the iPad our app only supports landscape left and landscape right. When you rotate from one to the other, on the rotation animation the screen rotates from upside down to right side up, but when it does this it lands in the wrong position. (The bottom-left corner of the screen ends up approximately 200 pixels up from the bottom and an equal number of pixels inset from the left.)
This may also happen on iPhone, but on iPhone we only support portrait so rotation isn't an issue.
One additional piece of info, if I build with Xcode 6 but run on an iPad with iOS 7 there is NO issue. This ONLY happens when I build with Xcode 6 and run on an iPad with iOS 7.
Has anyone else seen then behaviour and know what the root cause may be?
I found another Question on stack overflow where someone else has the EXACT same problem. Their screenshots show the EXACT rendering misplacement on the rotate as the app I'm working on. Here is a link to that other question. (Frustratingly, it appears no one has answered the question, and none of the suggestions have given me a solution.)
Here is the link to the other questions that shows the same bug as me:
Is this an iOS 8 Bug (orientation issue on rotation)?
I found the answer to my problem. One of our other developers noticed an "unexpected nil in main window" when attempting to tap on the far right of the screen. This led me to do a new search and I found this thread on stackoverflow that actually contained the answer to our problem.
( here is the link to the question which help my answer: unexpected nil window in _UIApplicationHandleEventFromQueueEvent )
The actual answer came from frankish who suggested opening the main.xib (or main storyboard) and clicking on the Window in that and making sure that the "Visible at Launch" and "Full screen at Launch" properties are checked (set to true.)
In our case, it was JUST the "Full screen at Launch" property that needed to be set, but setting this fixed the rotation problem we were seeing AND it fixed an issue where when launching on iPad in landscape the far right of the screen was not touchable.
I'm trying to learn how to display a scroll- and zoomable image in iOS.
While playing with the Imaginarium example from
CS 193P iPhone Application Development, I encountered the following problem:
If I scroll as far down and to the right as possible, I can see the the bottom right corner of the image (first screenshot). This is the expected behavior.
As soon as I zoom a little bit and again try to scroll as far down and to the right as possible, the UIScrollView prevents me from scrolling down far enough to see the bottom of the image, but allows me to scroll farther to the right than necessary to see the right edge of the image (second screenshot).
I can reproduce it in the iOS 5.0 simulator (built with Xcode 4.3.0) and in the iOS 5.1 simulator and an actual iPad running iOS 5.1 (built with Xcode 4.3.2).
It seems to work fine in portrait mode. Any ideas how to fix this?