UIScrollView can not scroll after add subview to superview - uiscrollview

My viewController already have main scrollView for show content as subview in Storyboard. After that i'm try to add new subview for show image gallery (UIScrollView) that also work fine. then when i'm close image gallery view, the main scrollView content size decrease down to fit of the viewController bounds. How can i avoid that situation? Thank you in advance.

Related

How to add an existing view to a UIScrollView

I have created a view and the content is larger than the screen. How do I add this view as a subview of a scrollview? For some reason I can't do this in Document Outline. It will only let me add the scrollview as a subview of the existing view.
Select your view in Interfacebuilder and then use the menu command Editor:Embed In:Scroll View

Add ScrollBar to viewcontroller IOS 7 (Swift)

I have a view controller that contains various controls in swift, when it turns to landscape, it doesn't show all controls, how can i put a scrollbar please?
Add a UIScrollView to your UIViewController's view. Then add all of your subviews inside this UIScrollView. Adjust your scrollView's property accordingly when the device changes orientation.

Setting the scrollable area UISCrollView

I tryed to use answer it this quiestion Limiting the scrollable area in UIScrollView however i didnt succeed in my problem.
I have a UIScrollView that contains 3 UIView one after another. When I press on the UIView I add a UITableView under UIView i pressed. At this moment I need to limit scrolling area, so I could scroll only this TableView and UIView.At another press on UIView I hide the UITableView and I can scroll further in horizontal direction. My question is - how its possible to implement scrolling only in that area I described? Only thing I know is I have to change contentSize of my UISCrollView, but when I do it I get to the beginning of UIScrollView.

Bring ScrollView to front

I have a View, inside this view I have on the right side some buttons and a ScrollView.
When you press one of the buttons, the scrollview comes up and more buttons are shown.
Now when you press one of the buttons of the scrollview in the main view is placed a image and the scrollview animated thru the right side.
When I push the next button, the scrollview is under the image and not over the image :(
I'ved tried to place some code at the scrollview to bring it in front
[waende bringSubviewToFront:waende];
or
[waende bringSubviewToFront:button];
but still doesn't work
In the IB the ScrollView is in Foreground.
The solution code is:
[self.view bringSubviewToFront:waende];

Scrollbar in UIScrollView and UIWebview

I've been searching for some time for an answer on this problem:
How can I keep the scrollbars on my UIScrollView and UIWebview visible? So that the user knows he can scroll up or down. (like in firefox or any other browser so without touching the scrollvie first)
I read on some sites that it wasn't possible, so my other question would be:
Is there a way to add a "scrollbar" to a scrollview or webview?
Thank you very much
Maybe you could use this:
flashScrollIndicators
It won't show the scrollbar all the time, but it just flashes when the view is loaded.
Edited: Other solution:
In your view didload, you make a scrollview of you webview like this:
UIScrollview *scrollview = [webview.subviews objectAtindex:0];
you have to set the delegate of the scrollview on self:
scrollview.delegate= self
in your .h file you add
When you place in your .m file you can use:
-(void)ScrollviewDidscroll:...
(I don't know if it works when you have multiple scrollviews)
Yes you can try adding a custom view ( can be image view) on top the scrollbar. You will have to monitor the contentOffset and contentSize to know where you are. Based on this information, you can position your custom scroll bars.

Resources