Interface cut jumps on load in simulator and iOS 8, but not on iOS 7 real device - ios

I have a problem with my interface on iOS 8 GM(real 5s) and iOS 8 Simulator(iPhone 5, 5s, 6 and 6+).
When I'm testing the app and I load my custom player view controller, the interface make a jump when interface is shown. And when testing on real app, instead of jump MPVolumeView is appearing in a some kind of expanding animation.
However, the problem is not there when I'm testing it on iOS 7 iPhone(the real one).
Also I've found out that if I remove all the constraints from the view that is loaded the jump issue disappears.
May it be a bug in iOS 8 behavior? Or it is some new behavior that I'm getting wrong?
EDIT: Testing on iOS 7 simulator definitely makes it look like it's some new behavior of iOS 8(on iOS 7 it works fine).
Here is the video for better understanding of the problem:
(black bar is MPVolumeView)
http://www.youtube.com/watch?v=gfc3n2syqo4

Okay, I've figured it out.
For some reason, if you set constraint from the view to the bottom layout guide, the view will jump on load. Don't know if this is expected behavior, I think I will post bug report for this one.
TL;DR remove bottom layout guide constraint and use other constraints.

Related

Constraint the interface of ios application to look same in all simulator

I make my application in xcode 8. I set my interface design in iphone 5 simulator in main.storyboard. My interface has scroll view and the image button all is put inside the scroll view. I constraint the scroll view and image buttons with reset to suggested constraint. When run in simulator, only iphone 5 look nice but other iphone look no good. I post my output in below, i think it is easy to understand what i want? If know how to do, please tell me. I want my application design look same in all simulator. First picture is iphone 5 and second picture is iphone 7 plus.
Output:

How To Fit UITableView in the screen with AutoLayout

I am trying to fill the screen with a TableView. I've tried pinning 4 edges but it broke when I view it in different devices (iPad Pro, iPhone SE, landscape and portrait orientation). The TableView is messed up for some reasons. It shouldn't be this hard to fill that in. Did I messed up some settings in my Xcode?
If you ran the application on a real device you'll find it as you expect it to be.
And if you opened another file then came back to storyboard you'll find the preview as expected too, I think it's a bug in the UI Builder.
Note: I'm using Xcode Version 8.3.2.

Why is my App always shifted to the right in the iOS Simulator?

I am building a simple iOS app using Storyboards. Currently running Xcode 7.2.1. I have previously built one using .XIB files and never had an issue with layouts on devices.
I have a UIViewController that has a UINavigationBar and Bar Button Item. When I run the app in the simulator, everything looks shifted to the right and partly off screen. The title should be shown in the centre. I am simulating using iPhone 6 and everything in Simulated Metrics are set to Inferred. Could someone help me understand, am I missing a step?
The views are shifted because you didn't set the auto layout constraints. To fix this, add missing constraints.

Transform making UIView disappear on iPhone 6 device

I have the weirdest problem specific to a iPhone 6 device. It's related to doing transform on a UIView.
If I do something like this on my UIView:
view.transform = CGAffineTransformMakeRotation(3.14/10)
Then the view disappears entirely. On my iPhone 5, then the view rotates as it should, but on the iPhone 6 it disappears entirely.
Any animation using transform also works perfectly on my iPhone 5 but on my iPhone 6 it doesn't show and sometimes shows "sharded" views of what I'm trying to animate.
This is iPhone 6 specific and only occurs on the device and NOT in the simulator.
Any suggestions on what this could be about?
It seems likely that something is using the frame of the view, which is undefined when you have a non-identify transform. For example, there might be a layoutSubviews method or constraint which is interacting badly with your view (It's better in iOS 8, but perhaps you ran into a yet-unsolved case). It's hard to tell what exactly is going on since you didn't supply a completely example.
You might try a tool like Xcode's view inspector or Reveal which can show you where your view is ending up and what constraints are acting on it. If that's not instructive, you should make a minimal example and post it.
It could also be differences in iOS version. Do your devices and simulators share the same point release?
It ended up being RubyMotion specific, so sorry for posting it with iOS tags - http://community.rubymotion.com/t/transform-making-uiview-disappear-on-iphone-6-device/344/4.

Weird space in iOS7

I just ran a demo app on iOS 7 target, this is what I get:
I'm using a storyboard and it looks well in iOS8. Constraints are correct.
I already checked e.g.
UITableView is starting with an offset in iOS 7
but the issue in this case is the whole thing, incl. status bar has the offset, no idea what this is. I played around with the layout settings of the view controller in the storyboard without any effect.
I also created a brand new (single view) project, ran it without changing anything, got the same issue. Don't know what can go wrong in a new project concerning autolayout as I can't set any constraints in the root view controller's view...
Any ideas?
Thanks in advance.
Try adding a "Default-568h#2x.png" launch screen to keep your iOS 7 device from running the app in Letterbox mode.
What Apple really wants you to do is use Auto-layout (see point 1 in the linked blog), which is what I suspect your demo app isn't doing.

Resources