cs193p

Passing object from controller to a view

I'm following iPhone dev courses from Stanford Open-University, and I've been blocked for 2 days on assignment3, maybe someone can help me here? The tasks are: Create a custom UIView subclass that will display your PolygonShape object Give your view class access to the PolygonShape object so that it can retrieve the details of the po...

Are the solutions to Stanford's online iPhone development course anywhere on the web?

I am working through Stanford's online CS course for iPhone development and from time to time I get stuck on something. Does anyone know if they supplied solutions to the weekly homework anywhere? It would also be nice to have something to check my work on after I finish each lesson. The course has been over for some time so I don't thin...

Why won't my objective c implementation file recognize my import statement

Here is my header file #import <UIKit/UIKit.h> #import <Foundation/Foundation.h> #import <PolygonShape.h> @interface Controller : NSObject { IBOutlet UIButton *decreaseButton; IBOutlet UIButton *increaseButton; IBOutlet UILabel *numberOfSidesLabel; //IBOutlet PolygonShape *shape; } - (IBAction)decrease; - (IBAction)incr...

Is there a shortcut to get to the /Resources/ folder in iPhone development?

Is there a shortcut method much like NSHomeDirectory() and NSTemporaryDirectory to get to the resources folder within your project? Is the /resources/ folder the best place to be storing a file? ...

How can I create a variable sized UITableViewCell?

I can't seem to get the text to actually span multiple lines. The heights look correct. What am I missing? - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { UITableViewCell *cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:@"StatusCell"] autorelease]; ...

How am I leaking memory?

I have a table view that when loading creates a person object Person.h #import <UIKit/UIKit.h> #import "TwitterHelper.h" @interface Person : NSObject { NSDictionary *userInfo; NSURL *image; NSString *userName; NSString *displayName; NSArray *updates; } /* @property (retain) NSString *userName; @property (retain) NS...

Can't find the example projects from Stanford cs193p

I am looking for the Flickr multithreaded example application that is used in lecture 10 "Performance and Threading". He does a few things that I would like to look at. The particular files I'm looking for are ImageLoadingOperation.h and MyTableViewController.m? Does anybody know if they exist somewhere out there and I just missed it? If...

stanford cs193p - PrintIntrospectionInfo - section 4 assignment 1b

I'm having trouble with section 4 of the stanford iphone class on assignment 1b. I am having trouble understanding how I will build the array and what the assignment expects. Should the array be a "global" variable? Where should I define that? Will each of the other subfunctions add their variables to the array? Is the PrintIntrospect...

EXC_BAD_ACCESS upon simple iPhone app startup

Background: I'm trying out the "HelloPoly" assignment in the CS193P course. I've created my .xib file, and a custom Controller class. I haven't fleshed out any methods - I've only allowed IB to write the class files into xcode. Problem: Every single time I startup the application, it bombs out. When I run gdb I see it's an EXC_BAD_A...

CS193P - Assignment 3 - drawRect get called only on the first setNeedsDisplay.

Hi! I'm taking CS193P iPhone Development courses, and even if.. I know that I'm pretty late comparing to Stanford's students, I'm doing Assignment 3. My current problem is: My drawRect method does not get called on every setNeedsDisplay... but only on the first. Also, what I noted is that my polygon object is NULL (from PolygonV...

iPhone: Rotating a drawing without rotating the view within which it is drawn

Anyone who has gone through the Stanford CS193P class on iTunes will recognize this from Assignment 3 (HelloPoly). For those not familiar: I have a custom view called polyView, an instance of PolygonView, a subclass of UIView. On this view, I use CGContextDrawLinearGradient to paint a color gradient over the entire rectangular view. T...

Core Data database doesn't save

I'm trying to implement the Paparazzi 2 assignment from the Stanford CS193 course and I'm running into a problem. My one call to save the database is when the app exits (I'm borrowing heavily from Mike Postel's version to check my code): - (void)applicationWillTerminate:(UIApplication *)application { if (flickrContext != nil) { ...