concept argument in category ios

appears as: n argument, rguments, arguments, argument, The argument, Arguments
iOS 4 in Action: Developing iPhone and iPad Apps

This is an excerpt from Manning's book iOS 4 in Action: Developing iPhone and iPad Apps.

Sometimes you’ll want to send an argument with an init. You can do so with an initialization function that you name using the format initWithArgument:(argument). Other than the fact that you’re sending it an argument, it works exactly like a bare init. Here’s another example drawn from code you’ll see in upcoming chapters:

[[UITextView alloc] initWithFrame:textFieldFrame];

Initialization methods with arguments allow you to create nonstandard objects set up in ways that you choose. They’re common in UIKit.

One initialization method with an argument deserves a bit of extra mention. initWithCoder: is a special initialization method that’s called whenever you create an object with Interface Builder—and important if you want to do setup for such objects. We’ll return to Interface Builder in chapter 3.

There are three ways in which this message could be slightly more complex. First, it could accept arguments; second, it could be nested; and third, it could be a call to one of a few different recipients.

This is the way in which Objective-C’s messages vary the most from C’s functions. You’re going to come to love it. You no longer need to remember the ordering of the arguments because each gets its own title, clearly marking it. The result is much more readable.

iPhone and iPad in Action: Introduction to SDK Development

This is an excerpt from Manning's book iPhone and iPad in Action: Introduction to SDK Development.

Sometimes you’ll want to send an argument with an init. You can do so with an initialization function that you name using the format initWithArgument:(argument). Other than the fact that you’re sending it an argument, it works exactly like a bare init. Here’s another example drawn from code you’ll see in upcoming chapters:

[[UITextView alloc] initWithFrame:textFieldFrame];

Initialization methods with arguments allow you to create nonstandard objects set up in ways that you choose. They’re common in the UIKit.

One initialization method with an argument deserves a bit of extra mention. initWithCoder: is a special initialization method that’s called whenever you create an object with Interface Builder—and thus is important if you want to do setup for such objects. We’ll return to Interface Builder in chapter 3.

There are three ways in which this message could be slightly more complex. First, it could accept arguments; second, it could be nested; and third, it could be a call to one of a few different recipients.

iPhone in Action: Introduction to Web and SDK Development

This is an excerpt from Manning's book iPhone in Action: Introduction to Web and SDK Development.

The third drawImage method is the most confusing because it rearranges the order of the arguments. Here we’re taking a slice of the original image, starting at 0,75 that’s 150 wide and 75 tall. In other words, it’s the bottom half of our 150x150 image. Then we’re drawing it on our Canvas at 125,125, scaled down to a size of 50x25, which is again one-third size because our half of the image is 150x75.

Sometimes you’ll want to send an argument with an init. You can do so with an initialization function that you name using the format initWithArgument:. Other than the fact that you’re sending it an argument, it works exactly like a bare init. Here’s another example drawn from actual code we’ll see in upcoming chapters:

[[UITextView alloc] initWithFrame:textFieldFrame];

Initialization methods with arguments allow you to create nonstandard objects set up in ways that you choose. They’re quite common in the UIKit.

One initialization method with an argument deserves a bit of extra mention. initWithCoder: is a special initialization method that’s called whenever you create an object with Interface Builder—and thus is important if you want to do setup for such objects. We’ll return to Interface Builder in chapter 12.

There are three ways in which this message could be slightly more complex. First, it could accept arguments; second, it could be nested; and third, it could be a call to one of a few different recipients.