Interface builder and deleting a view causes app crash

Discussion in 'iOS Programming' started by Velox, Jul 30, 2009.

  1. Velox macrumors newbie

    Joined:
    Jul 30, 2009
    #1
    I added a new UITextView to my app by dragging it onto my current view which was a scrollView thinking I was adding a text field. I realized that this is not what I wanted to do so I went back through Interface builder and deleted the UITextView. The program still compiles cleanly but when I go to run it in the simulator it crashes. Im still rather new at this so I am not sure where to start looking, but I am guessing that there is something left over that is pointing to the deleted view and thus causing the crash.
    Where should I start looking so I can remove any bad references to the deleted view?

    Thanks

    Added : I checked the debugger and saw the message : NSInternalInconsistencyException , reason: '[UIViewController _loadViewFromNibNamed:bundle:] loaded the "scrollTestViewController" nib but the view outlet was not set."
     
  2. boyplunder macrumors regular

    boyplunder

    Joined:
    Sep 8, 2008
    Location:
    UK
    #2
    Hi Velox,

    What did you do with the outlet that was assigned to the scrollview you deleted? Is it linked up to a new textview?
     
  3. Velox thread starter macrumors newbie

    Joined:
    Jul 30, 2009
    #3
    I just went back and checked to see what became of the outlet that was assigned to the ScrollView and there was nothing there. So, I reassigned it and that seems to have solved the problem. I guess in the process of adding the second view the first view (scrollView) got disconnected from its outlet.
    Thanks for the help.
     
  4. boyplunder macrumors regular

    boyplunder

    Joined:
    Sep 8, 2008
    Location:
    UK
    #4
    Velox,

    Sounds like I was on the right track.

    Try to avoid adding stuff to the initial post. Always post a new entry so people can follow in an ordered manner.
     

Share This Page