iOS Button not clickable after Animating to reveal panel - ios

I have a UIView that has a container view hidden off the frame that I reveal via animation when you click a button. However, once the animation completes I cannot interact with any objects in the frame that just animated into view.
View Hierarchy
View layout
You will note two things about the view layout
the Container view is outside of the normal view frame/bounds
it has a fixed height (those are the constraint likes you see)
I tried expanding the frame height and bounds in order to accommodate the height of the container view, but after the animation I still can't interact with views in the Container.
What do I need to modify to allow interactions to work once this view animates into view?

Related

Adding a fixed-position view on top of a view

I have a UITableViewController inside a UINavigationController. I'm adding a "modal" subview to the tableView, which is a custom UIView when one of the rows is selected.
(It’s modal in spirit, not in the UIKit sense, since Apple doesn’t support modal views on iPhone, I’m adding it with a [self.view addSubview:customView] in my table view’s controller.)
I would like it to appear at the bottom of the screen and stay put there. I can get it to draw at the bottom, but once I scroll the table view, the view moves with it. Here are some illustrations:
Initial position (good):
Position after scrolling (bad):
I'm getting the bottom position by subtracting the height of all the chrome (navigation bar and status bar) as well as the height of the custom view from [UIScreen mainScreen].bounds.
How can I get the custom view to stay put? Should I constantly be adjusting its frame when the table view is being scrolled?
Your best and most flexible option is to switch to using a view controller with the table view as a subview so that you can change its frame and add sibling views. Then, when you want to add a modal you can run an animation to move the table view out of the way and slide the modal view in.
UITableViewController.view is an instance of UITableView. Means you added your custom view into a scroll view and that is why it scrolls. You can try to put your custom view into the tableFooterView property of the UITableView, which is the old school solution.
Personally I would create a container UIViewController and have UITableViewController be a sub viewController of it. Another sub viewController UIViewController or just a simple UIView could represent the footer.

Autolayout and embeded scroll views

I have a view that contains a scroll view and that scroll view has another 2 views in it: on top a standard view, and under that another view. This last view has a scroll view inside it. (a matroshka doll has nothing on this app) .
The problem is there is a button that causes the bottom view to resize and increase it's height, but the outer scroll view doesn't increase content size. So the bottom part of the bottom view (now resized to be bigger) is not visible.
Any suggestions on how to fix this mess ?

ScrollView inside View or Vice Versa?

I am working in iOS and cannot find if there is a definitive answer to this.
I have a screen, the entire thing will scroll (not just part of it is scrolling at the top). I am using Storyboards to build this and the content is bigger than the screen size. Is the best way to do this with:
This is all inside of a UIViewController.
The content inside a View (child) inside a fullscreen ScrollView (parent) and set content size of ScrollView as the View's frame.
The content inside a ScrollView (child) inside a fullscreen View (parent) and set content size of ScrollView as its frame and then its new frame as the View's frame.
Just a ScrollView as the first child of the ViewController and set its content size as its frame and then its frame as the screen size (which I would need to check at runtime?)
All of these methods seem to work, but they make other things easier/harder (moving content for keyboard, etc.). Is it simply a matter of opinion or is there a "best/correct" method?
You have to set content size bigger than your view. Then It will scroll.

UIScrollview, other controls, not scrolling

I have an app which shows two images housed within a UIScrollview.
The scrollview is of size (320, 530), underneath it is an imageview size (320,38), this acts like a dock at the bottom of this screen, ( in fact it has to be there at the bottom of all screens in this app).
As it stand the scrollview works fine and the images switch from one to anothr when the user
moves the scrollview.
The problem is, I need the scrollview height to go all the way down ( from 530 to 568), and end up behind the dock imageview, when I change its height and the height of images within it, it just stops scrolling.
Is this impossible in scrollviews? does it have to have all of its screen real estate as top view?
Any solutions for this?
Thanks.
Update :
so I worked on the alpha and the image constraints, and the bottom imnage is located properly,
still the scrolling is not functioning.this is the latest code with changes.
http://ge.tt/4LYJGWl/v/0?c
thanks.
This is certainly possible. Add a full height scroll view to the controller's view, then add the small image view to the bottom. In the scene list at the left move that image view up so it's directly underneath the main view, which will make it a subview of that view rather than the scroll view (you'll then need to move the scroll view up above the image view so the image view will appear on top). You'll probably have to change some constraints to pin it to the bottom, and give it an alpha value less than 1 so the scroll view will show through.
After Edit
This is the screen shot of the scene from your updated code:
You only have one view that's directly under the main view, your scroll view. Compare that to my image.

Animation for scroll view during its content change

I have a scroll view whose content changes dynamically. Is there any animation effect that i can give to my scroll view when the content is re-populated. The content are just image views. I am using some filtration process to repopulate my scroll view by the image views.

Resources