My buttons and textviews are displaying properly inside the container view but they are not responding to clicks/taps. The container view's height is set to the regular portrait size (780). The container view is placed in a scroll view
The view controllers you get out of the container are independent controllers. Don't forget to set delegate there.
Related
I'm loading a UIViewController from storyboard in a Container View but the content appears to start vertically somewhere out fo bounds. Here a simple controller with a view showing a label as example:
What is causing this? How to prevent it?
Found out what was causing it while creating a new project to extract the problem. The view holding the label is inside a scroll view and had its height set to equal the hight of the root view. The root view is however as big as the device's shape and this was what made the content to go out of bounds.
I have a UITableViewController with 3 static cells. The second one is a container view.
This container view is a UIViewController form with some UITextField's.
When I touch any of UITextField's it does not scroll to the right position, above the keyboard and in the visible area. Every textfields goes out of the screen.
I'm used to implement forms with UITableViewController and it always works good, but it's the first time I implement it with a form inside a container view. Any solutions?
I have a scrollview, I embed 3 controllers inside this scrollView in storyboard, and page between them horizontally.
content size of the scrollview is (scrollViewWith * numberOfControllers , scrollViewHeight)
scrollview appears and I am able to scroll horizontally thought the views, but the views don't detect any touch. (The controllers embedded have collectionViews inside them)
I implemented touchesBegin in one of the controllers, and it's never getting called.
Any idea what could cause the scrollview not to pass touches to subviews?
This isn't necessarily an answer to why touch events aren't making it to the collection views, but it sounds like you're reimplementing UIPageViewController with the transitionStyle set to .Scroll. Maybe consider using that instead?
when adding views to a controller through embedded segue, the view of the viewController is not added directly inside of the main view, but it's embedded in another container view before being added to the main view
ViewControllerView->EmbedView->EmbededViewControllerView
So I ended up removing them both, and manually add the view of the viewControllers to the scrollView
what kinds of view's you have inside every page of the UIScrollView?
You can add anything there, for example a UICollectionView, and the only way to prevent to not pass touches inside is having the UIScrollView set as:
self.scrollView.userInteractionEnabled = NO;
I'm trying to add my custom ContainerView to an usual ViewController using StoryBoard (iOS7).
I only have a TableView Controller on this view. If I move the ContainerView inside the TableView it is displayed (but moved with the table items), but if I place it directly on view it is not displayed any more! Any ideas?
There appears to be a bug in Xcode/iOS where if the container view is the first child of self.view in storyboard, it doesn't show. For example when I have:
my container doesn't show.
But if I move the label above the container view in the outline:
Then my container view and the label will show.
UPDATE: Upon further investigation it appears the container view does still show if it is the first child, just much lower than you would expect it to appear. Placing another element above the container view allows the container to appear in the position you would expect (the position shown in storyboard).
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?