Bring ScrollView to front - xcode

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];

Related

UIScrollview scroll not working

UIScrollview scroll is not working when i tested application in device (iPhone 5), But scroll is working properly in iPhone 5/5s/6/6 Plus simulator. I am developing application using Xcode 6 and UIStoryboard with AutoLayout.
I set the top, bottom, left and right constraints of UIScrollview with relative to Superview. And i also set the constraints of every UIControl which is in the UIScrollview.
Has any one have solution regarding this issue?
Please see below screenshot for reference.
It's probably easiest to have the scroll view contain a single view, which then contains all of your scrollable content. That single view should be anchored to all 4 sides of the scroll view, and if it's only meant to scroll vertically (which is what your screenshot makes it look like), then set the content view to be the same width as the parent of the scroll view.
To make sure an UIScrollView scroll, you have to check
Size
Your content View is bigger than your Scroll View. If you want it to be scrolled vertically, make sure its higher; horizontally, wider.
Constraints
Make sure your Scroll View is pinned to its super view, Top, Bottom, Leading, Trailing.
Make sure your Content view of Scroll View DOES NOT have CenterY constraint set to Scroll View, cause that'd make content view stuck with Scroll View and it'd never be able to scroll. (That happens to me the last time I was stuck)
Interface Builder settings
Make sure the check in Interface Builder under Scroll View is checked:
Scrolling section, Scrolling Enabled.

UIScrollView not scrolling after navigating back to view in ios7

I have a project I was working on in XCode 4.whatever where the main view is a Netflix-style layout with a series of horizontally-scrolling scrollviews. The main scrollview may be scrolled vertically to see all of the horizontal ones. This is connected to a navigation controller so when an item is touched it performs a segue, whereupon the user can click a standard navigation bar back button.
This was working as expected with XCode 4.*, iOS 6.1. I have now upgraded to XCode 5 and iOS 7. The scrolling works fine upon initial load - the main vertical one and subview uiscrollviews. After navigating to an item and touching the back navigation bar button the main view won't scroll vertically. The subviews that are visible still scroll horizontally.
I am using a storyboard. The master view controller contains a Scroll View as the top item and a View with a couple subviews for the feature section at the top. The horizontal scrollviews are added programmatically.
The master view controller is a UIScrollViewDelegate and I have connected an IBOutlet from the main scrollview to my master view controller .h file.
That it works initially and then stops scrolling leads me to believe that the content size is being recalculated - and set equal to the frame size - after the navigation. However, I tried setting the content size within viewWillAppear to no avail. I did verify the routine was being called after navigation.
Any ideas on why the main scroll view loses its scrolling?

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.

How to temporarily disable UIView background image from responding to mouse clicks in Interface Builder?

I have a UIView background image that I want to use for my view.
Now, on top of this image, I want to have buttons and position them relative to what I see in the image.
The problem is, these buttons were already added to the view before the background image was added. So now when I put the background image, entire view is background image and I am unable to access the buttons underneath it in Xcode.
Is there a way to tell Xcode that I am not interested in the UIView but actually the buttons that appear underneath it?
Check - (void)sendSubviewToBack:(UIView *)view in UIView
Would be something like
[self.view sendSubviewToBack:backgroundImageView];

UIScrollView can not scroll after add subview to superview

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.

Resources