Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

gizzerd91

macrumors newbie
Original poster
Why is it that IBAction functions have a semicolon in them right before the curly brackets, while all other functions I am aware of do not?

Code:
- (IBAction)click: (id)sender;
{

Why does the asterisk, which I assume is for declaring a the new variable "application", come inside of the parenthesize?

Code:
- (void)applicationDidFinishLaunching: (UIApplication *)application {
 
Why is it that IBAction functions have a semicolon in them right before the curly brackets, while all other functions I am aware of do not?

It is an oddity of Objective-C syntax that placement of a semicolon before the curly brace is optional. There's nothing special regarding IBActions in this regard; it's the case for all methods.

Why does the asterisk, which I assume is for declaring a the new variable "application", come inside of the parenthesize? (UIApplication *)
The star indicates that this is a pointer. You read pointer expressions like this from right to left. Pointer to UIApplication object. You need to read more about this in a book about C and then one about Objective-C. In the line of code that you show the pointer expression is the type of the parameter named application.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.