iOS 8 AutoLayout + UIScrollView: Preview OK, Build UIScrollView empty - uiscrollview

I have a weird problem: I use Autolayout for a UIScrollView with child views, and when I show the Preview everything looks fine:
But when I build the app the content is not shown correctly, seems to be an content size issue.
I pinned all of the child views correctly, didn't set any content size (as should be with autolayout scrollviews), but I can't get the scrollview work with correct content size.
Anyone that can help me on that?
Thanks!

Related

UICollectionView container inside of UIScrollView breaks scrolling in ios 9.1

I have one large scrollView that contains a collectionView and a tableView. Neither the collection view and table view scroll independently. Both are resized based on their content so the user is just scrolling a long view within the scroll view.
This has always worked out fine until ios 9.1. Now any attempt by the user to pan within one of the collection container views fails to scroll the outer scroll view.
Can someone explain what has changed in ios 9.1 to make this setup no longer work?
My problem was entirely related to this issue with LXReorderableCollectionViewFlowLayout

Text starting at wrong position in textview in Xcode 6

There's no code involved at the moment, only storyboard or xib files as far as the textview is concerned. This is what I get when running the app on my iPhone 5s or via the simulator.
I'm using auto layout and size classes with the option any width-any height. An imageview at the top, then a label, then the textview.
Here's a picture of the screen. As you can see, it looks as if the text is starting behind the label, but the textview's y is after the label and the constraints seem all correct according to Xcode 6. It works fine on iPad.
Any idea of what I'm doing wrong?
I've found a way round it: textview should have no scrolling enabled and should be put in a scrollview instead, which will do the actual scrolling. Need to add constraints to both.

iOS 8 Custom keyboard autolayout issues

I just finished laying out all my buttons for a custom keyboard (xib file) and when I finished adding all the constraints, I didn't have any autolayout issues but when I try to run it either on the simulator or on my 5S, the view isn't the correct size it looks like all of the items in the view sized correctly but the view did not. Is there any way to fix this?
Here is what it's supposed to look like:
Here is what it looks like live:
And in the preview in IB:
Thanks in advance!
Turns out I needed to set the frame of the keyboard view equal to the frame of it's superview
self.keyboardView.frame = self.view.frame;
simple mistake

xcode ios 7 fixed height of tableview with statusbar change and in ib

I need to make my tableview not change height at all. Not shrink when statusbar is changed. I am using storyboard and i have another viewcontroller with a embeded tableview where the tableviews height stays the same no matter what.
In interface builder when switching from 3.5" to 4" the tableview changes size. I have fixed this by setting height programmatically. However the height changes when statusbar is changed. I cant seem to find the property in IB that turns off this autosizing feature for my second tableview. Im am not using auto layouts. I dont know why the height allways stays the same on my other tableview in my other viewcontroller.. Can someone please help me out??
Auto resize subviews was the property for the main view that was enabled . Disabling this fixed it.

ScrollView wont scroll, xcode 4.2.1

I am using the Interface Builder storyboard in xcode 4.2.1
I have already made a new .h and .m file for the scrollview.
I heard people talking about setting contentSize to something, but I don't know how to do that. Can someone help?
What I want is a simple scrollview which I can insert text and images into. And it has to scroll.
Thanks!
You have to set content size for scroll view in which your image or other view can scroll. It will be the total size of all view. You can set content size as followings:
[scrollView setContentSize: CGSizeMake(scrollView.bounds.size.width * numberOfPages, scrollView.bounds.size.height)] ;

Resources