I have a view controller with some fixed labels, steppers etc. The layout looks fine in iPhone5, 6/6 plus, but when i try in iPhone4s the view just doesnt scroll down to show other content.
Should the scrollbar not appear automatically when the content does not fit in screen size?
Here is how the layout in iPhone 4s looks along with how it should actually look
It would be great if someone can help me identify why is the content not scrolling for iPhone4s
Thanks in advance
No, it should not scroll automatically. You need to embed your view into a scroll view or (better) use table view.
Related
On my phone the view seems to be zoomed in (to large for the screen)
Screenshot from iphone 5s
Compared to when Im building it in xcode:
i control clicked dragged every where and now it does auto layout itself
Hi I'm new to iphone programming and I'm having problem with scrolling on the storyboard. Let's say I need to add 30 buttons on a viewcontroller inside a scrollview, but the screen size only fits 15, how do I scroll down and add more buttons.
screen shot 1
Another problem I have is that when I run the iphone app on the simulator, it can only scroll down too the button 13 even though there are 15 buttons on my view controller.
screen shot 2
Thanks for your help.
you can scroll the scrollView on the storyboard. Scroll down and then add buttons.
You need to set a size appropriate for Scroll ContentSize. Take a note at that.
Please do provide more info from. Its gonna make the resolution process easy.
Take a look at this link for solid ScrollView intro:
http://www.raywenderlich.com/76436/use-uiscrollview-scroll-zoom-content-swift
In the storyboard... Just make the view bigger. In your case, you want to change the height:
For the problem of not being able to scroll across all your images. You need to make sure the scroll view is pinned to all four sides of the parent view and that the height and width are all set-up for the content inside the scroll view. (make sure there are no warnings associated with the scroll view in the storyboard.)
I have a view which perfectly fits all other screens except iPhone 4s and below.At first I implemented scrollview for the view in iPhone 4s and below, but now scroll view has to be removed and the only go is to check weather the device is below iPhone 5 and adjust the frame so that content fits in screen. I have checked and tried updating frame of the view for models below iPhone 5.This doesn't work and the frame doesn't get updated as I am using auto layout. In short if the model is below iPhone 5 i want to update my y of the origin of the frame so that view is completely seen. Any methods ?
It is a little bit difficult to understand your question.
If you set the bottom layout constraint of the scroll view to be in line with the bottom layout guide of the main view, the scroll view should resize to fit the screen regardless of the model of phone.
It sounds like your issue is not with the scroll view frame but with the size of its content. I am not entirely sure though what exactly the issue is... i.e. what you are seeing versus what you would like to see.
I have a UIWebView displaying content of multiple pages in length.
The problem is this: a scroll bar never appears while the user is scrolling the content vertically (unlike in Safari, or in other apps using what appears to be UIWebView). I can't see any way to control this programmatically.
Behaviour is the same on iOS 3.1 through 4.2, on both iPhone and iPad, both device and simulator.
Anyone have any ideas?
Are you sure the WebView is not slightly bigger than its parent? If it's a bit too big the scroll bars might actually be there but off the screen.
[(UIScrollView*)[webview.subviews objectAtIndex:0] setShowsVerticalScrollIndicator:YES];
i am new developer on iphone and i am working on a project. the problem i am having is that i have no idea about how to create a horizontal scroll view of images. what i want is that when i click on the table view containing image thumbs, i should view the same image in a much larger size and scroll the other images that are on the left and the right.
The class you want is UIScrollView. You can add multiple UIImageViews to a UIScrollView.
In addition to ScollingMadness recommended by luvieere, check out Apple's UIScrollView sample code which is referneced from the Xcode UIScrollView documentation.