Relative Content

Tag Archive for objective-c

see what ARC does?

If I understand correctly, all ARC does is automatically add memory-management statements such as retain and autorelease in the proper places in a program. Is there any way to see all the memory-management statements that ARC automatically adds to a program?

Objective C style nil in java?

Objective C has a concept of a nil object which would accept any method call with any parameters without complaining and silently return another nil.

Strategy for avoiding duplicate object ids for data shared across devices using iCloud

I have a data intensive iOS app that is not using CoreData nor does it support iCloud synching (yet). All of my objects are created with unique keys. I use a simple long long initialized with the current time. Then as I need a new key I increment the value by 1. This has all worked well for a few years with the app running isolated on a single device.

When should one use “out” parameters?

In Objective-C, there are several methods like initWithContentsOfFile:encoding:error: where one passes in a reference to an NSError object for the error: parameter. In this example, the value of the NSError object passed in can change based on what goes on at runtime when the method is being called and whether the body of the method was executed in a certain way successfully. In a way I think of this NSError object as sort of like a second return value from the method, and only differs from an object anObject in the statement return anObject; in that when this statement is called, execution leaves the method.

What patterns book for iOS development contains this specific information? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for […]