obective-c

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...

How to unit test my models now that I am using Core Data?

I have been developing an iphone application using a domain model, and have put off the persistence aspect of the app until now. Core Data looks like a really good solution since I already have a well defined model but I am running into a snag with my existing unit tests. Here is simple example of what I have now: - (void)test_full_na...

Load class file dynamically (Objective-C)

In an effort to create a sandbox for CoreGraphics development (which currently consists of performing multiple build and run attempts in order to achieve the desired effect), I was curious if there was a way to dynamically load a class file at runtime. Much like Java's class-loader ability, I was hoping to use NSBundle or something simi...

iPhone Documents directory maximun size

Hi! I'm just wondering due to new personal project which is the limit (in MB or GB) of documents directory of my app. I just wanna save a lot of photos, so, has documents directory a limit for archiving downloaded photos? Will Saving 300MB of photos produce slow downs on 3G? If there is no limit, I think that limit shoud be the 8 16 32...

Convert string into variable

If in a class, I have a instance variable: nsstring *foo, now I want a create a variable with a string @"foo". exemple: I have the string @"foo", and with this string, I want a do: myobject.foo. thx, Alex ...

Core Data - GROUP BY

I am trying to group results returned by Core Data. I read that you need to use "SortDescriptors" with a selector but I cant seem to get it to work? I am trying to return group'ed "unique" name values? http://developer.apple.com/library/ios/#documentation/cocoa/Conceptual/SortDescriptors/Concepts/Creating.html Thanks James ...

Downloading tiles for CATiledLayer with NSURLConnection

Hi there, I'm looking into the Apple ScrollViewSuite and the Photoscroller, and I wonder how to implement a CATiledLayer when downloading the tiles through an NSURLConnection: how do I notify drawRect: that a specific tile has been downloaded and how do I keep track of the rects and contexts associated with each tile? Regards Fredrik ...