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?
Related
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.
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.
Using the MFSideMenu for iOS I noticed a strange behaviour when running the app on a larger display (iPhone 6 Plus). On left side's bottom I get a padding, meaning that somehow the height does not fit the screen coordinates.
Does someone had this problem? If yes, did you found a solution for it?
I have created view using autolayout it works fine in all iPhone devices but it left some blank space at left, right, top and bottom on iPad.I tried to make another xib specially for iPad which is 768*1024 but still facing same problem.
here is the screenshot of iPad output.
The problem is that you forgot to make this a universal app. So it is running on the iPad in emulation mode as an iPhone app in a reduced frame.
I have just installed Xcode 4.6.3 to test my OpenGL game (which was developed in Xcode 3) on Retina 4" simulator, and I have got two black bars on the screen's top and bottom.
I have added a Default-568h#2x.png image file with dimension of 640x1136 to my project, when I am testing on the iphone simulator, the Default image is displayed correctly with no bars at all, but once the game starts, the top bar is moved to the bottom of the screen, now I have a sum of two bars at the bottom and no bar at all at the top.
I have done some google search but it seems no one had the same problem before, I am getting this result on the iPhone simulator and have got no iphone5 to confirm this would happen in real device...
I would really appreciate someone could help on this.
Thank you.
I was having a similar problem and the solution I found was to stop using the asset catalog for the Launch Images. That allowed it to revert to using the properly named files it was looking for.