0

最初是在以前的 iOS 中编写我的代码并刚刚升级到 iOS 6.1 才收到以下错误。我是新手,如果这是一个基本问题,请原谅我,但我还没有弄清楚如何解决这个问题。如果这不能提供足够的图片,请告诉我要包含哪些代码,我很乐意发布它。完全错误:


2013-06-28 17:44:06.007 DrinkMixer[5747:907] *** Terminating app due to uncaught exception 'UIViewControllerHierarchyInconsistency', reason: 'A view can only be associated with at most one view controller at a time! View <UITableView: 0x81f0a00; frame = (0 20; 320 460); clipsToBounds = YES; autoresize = W+H; gestureRecognizers = <NSArray: 0x723bac0>; layer = <CALayer: 0x723b480>; contentOffset: {0, 0}> is associated with <UIViewController: 0x723cb00>. Clear this association before associating this view with <MasterViewController: 0x7141860>.

4

1 回答 1

0

当您的 viewController 的根目录上有多个 UIView 时,就会发生这种情况。将其他视图添加为主视图的子视图,错误就会消失。

于 2013-06-29T01:14:52.303 回答