Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
I'm having some problems with assignment three.

I have three custom classes: Controller, PolygonShape, and UIPolygonView

In the assignment handouts, Evan says that you need to give your custom UIView class access to your PolygonShape. Does anyone know how to do that?

In the UIPolygonView class I am trying to set up some draw code, but when I try something like

Code:
int sideToDraw = [aPolygonShape numberOfSides]

...I get the familiar 'error: aPolygonShape undeclared (first use in this function).' error message.

I realise it's probably some very basic class knowledge I am lacking here, but how do I let my UIPolyView see the instance of a PolygonShape that I created in my Controller class?

Many thanks for any help.

Where do you allocate and initialize aPolygonShape? Did you #import?
 
I alloc'd it in the Controller.m file - should I import that?

Or, in Controller.m should I alloc a polygonShape, and a polygonView, and then pass [polygonShape numberOfSides] to the PolygonView somehow?

Sorry for what seems to me to be a very confusing question :)
 
I am going to start watching them this week. Even tho I am a total newb to programming. I think it will accelerate the learning curve. Are they teaching any Objective-c in there?
 
I am going to start watching them this week. Even tho I am a total newb to programming. I think it will accelerate the learning curve. Are they teaching any Objective-c in there?

I think that's pretty much ALL they're teaching :p

But they are assuming some familiarity with C and basic programming in general. I've learned VBA, SQL, and HTML and I'm pretty confused as none of those are really object-oriented programming languages.

Good luck though!
 
Assignment 2a Questions

Ok... so in the assignment 2a specs it states to make angleInRadians, angleInDegrees and name all properties but to not have them backed by an iVar.

Is this possible?

I keep getting compiler errors that the synthesized property must be named the same as a compatible ivar or must explicitly name an iVar.
 
Ok... so in the assignment 2a specs it states to make angleInRadians, angleInDegrees and name all properties but to not have them backed by an iVar.

Is this possible?

I keep getting compiler errors that the synthesized property must be named the same as a compatible ivar or must explicitly name an iVar.

NM... so you can declare a @property and just not @synthesize it...
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.