“self” object for UIViewcontroller has @“0 objects” in debug window in xcode

≯℡__Kan透↙ 提交于 2019-12-08 15:55:21

问题


I segue to a Viewcontroller that immediately has 0 objects for "self" and although I can access "self." objects, I cannot see them in the debug window. Without pasting the code, is there a known reason for this to be happening? Thanks!

to clarify: In the debug window under "self", i can usually see my variables and classes and what their values are but for this one, I see none and it says @"0 Objects"


回答1:


It seems you did copy&paste some controls from other viewcontroller into the viewcontroller in the storyboard and xCode confused about the controls.
Following steps maybe help you.

  1. Restart xCode.
  2. Open the storyboard.
  3. Select all controls in the viewcontroller and delete them.
  4. Undo delete.


来源:https://stackoverflow.com/questions/27065074/self-object-for-uiviewcontroller-has-0-objects-in-debug-window-in-xcode

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!