Interface Builder connection issue...from a newbie

Discussion in 'iOS Programming' started by seasar, Sep 11, 2009.

  1. seasar macrumors newbie

    Sep 11, 2009
    Hi all,
    Like many many others I am trying to make my way through the cs193 online classes....for me understanding just what happens in interface builder has been the trickiest bit. If anyone still has some patience left to answer questions on this class, I'd greatly appreciate it!:)

    I've gotten assignment 3 to work but I had to bandaid around an error I couldn't shake.:confused:

    I don't think I'm hooking up my polygonview class correctly, I can't access setNeedsDisplay from my controller class (unrecognized

    selector). I got around it by having the buttons and the slider (for rotating the polygon, extra credit!) call a method in polygonview which calls self.setNeedsDisplay.

    I do not yet fully understand all the bits about connections in Interface Builder, I'm convinced I'm doing something wrong in it.

    My controller class declares a polyview ( IBOutlet PolyView *PolyView;) but does not instantiate it (alloc/init).

    It also declares a polygon shape (IBOutlet PolygonShape *p1;) and doesn't instantiate that but I can call methods in p1. I'm under the impression that connections in IB are instantiating these, both classes are designated outlets for the controller object (Controller outlets : p1 -> PolygonShape and PolyView ->PolyView).

    Can anyone provide me some insight? Have a specified enough above? Your help is greatly I said I crutched my way through this but I need to understand it.
  2. seasar thread starter macrumors newbie

    Sep 11, 2009
    ...figured it out, my controller class subclassed NSObject, when I changed it to UIViewController then redid the IB hookups all was well and good.

Share This Page