> ·         : UIViewControllerHierarchyInconsistency Reason: 
> ·             A view can only be associated with at most one view 
> controller at a time! 

This issue is probably more related to iOS 5 than iOS 6. Starting in iOS 5 
they added the ability to have child view controllers. Prior to iOS 5 you 
were told never to add a UIViewController's View as a subview of another 
view (other than the window, of course). If you were careful and lived 
with certain shortcomings (like lack of notifications for things like 
rotation notifications) then you could get away with it, but it was never 
really supported. In iOS 5 they provided an official mechanism for doing 
this. They provided methods like AddChildViewController and 
RemoveFromParentViewController, as well as notification methods 
Will/DidMoveToParentViewController.

As part of that change they started to enforce a relationship between the 
hierarchy of view controllers and the hierarchy of their views. That is, 
if a view controller is a child of another view controller then its view 
must also be a child of (perhaps indirectly) of the same view controller's 
view. Likewise, a view controller's view should not be a child (directly 
or indirectly) of another view controller's view if it is not a child of 
that view controller itself. This requirement is checked in certain 
situations, and if they find a violation then they raise that assertion.

Apparently your code violated that requirement. The solution is to use the 
new API to tell iOS about the relationship between the view controllers.
--
Adam Kemp
[email protected]
(512) 683-6058
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to