iOS 6 "embed Segues" causes unresponsive view

WWDC 2012 contains a session video called: "Adopting Storyboards in Your App" that demonstrates how to embed view Containers by utilizing the "Container View" offered within interface builder for storyboards.


Playing with this functionality I'm running into unpredictable behavior that cause some of the views to be unresponsive. Here is a general summary of what I'm doing:


1. Drag a "View Controller" object into my storyboard and embed into a navigation Controller and assign my user-defined class.

2. Drag 2 "Container View" objects and embed each one within the "View Controller" created in step 1.


User uploaded file

3. I insert a simple button on the left within the navigation toolbar when toggled, moves the right embedded view to the right using the logic:


UIView* rightView = [[self.childViewControllerslastObject] view];

UIView* leftView = [self.childViewControllers[0] view];


CGRect newPos = rightView.frame;

newPos.origin.x += leftView.frame.size.width;


main.frame = newPos;


4. Sometimes, this causes my left view (UITableViewController) to not respond to touch events (within Simulator). If I add code to move the view

back to it's starting point, the left view responds again.


Other observations: The placement of my views seems to affect the unresponsiveness. For example, I overlaps 90% of the left view with the right one and

when moved, it was fine. If I overlap 80% for example, the left view doesn't respond - the right one always seems to respond. In general, I have noticed that sometimes the views that are stationary, don't respond - depending on the placement of the view that I'm moving. In all my tests, the view that I move always responds.


thanks,

Nick

iMac, Mac OS X (10.7.2), 27" Intel Core I5 - 4GB ram

Posted on Jan 8, 2013 1:40 PM

Reply
2 replies

Jan 10, 2013 7:46 AM in response to zinc1oxide1

Through more research, it turns out that when I move my view to the right, visually it moves but the region that responds to touch events doesn't move. This is weird. I posted the question on this under: https://discussions.apple.com/thread/4690220


My initial thinking was that I was moving the wrong view but the 'view' property for a controller is the parent/root view and is the one I want to move.


I'm going to try all of this without "embed segue" containers but if anyone has a deeper understanding of why the visual representation and the touch region separates, that would help.


thanks.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

iOS 6 "embed Segues" causes unresponsive view

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.