I creating iOS app, which have showing some pictures. I am using Storyboard with Autolayout. I created view in which I add UIScroolView to specific position. In this view I am adding programmaticaly pictures depending on showing data. Basically it is UIView, to witch I am adding UIImageViews with pictures.
After I fill it, I can't scroll it to the right. I have set insects of scrollview to right, enable scrolling. I try many stuffs, but it is still don't working.
Can you help me? Thanks.
You have to add constraints programmatically if you want to achieve scrolling. And each side of your scroll view has to have at lest one constraint tied to it. So for example if you have 2 images you would have 3 horizontal constraints:
|-firstImage-secondImage-|
and 2 vertical constraints for every image:V:|-fistImage-|
andV:|-secondImage-|
. This way you can set the content size of your scroll view. You can find the Apple's guide here.