Solved

how to differentiate events from methods

Posted on 2014-03-01
2
243 Views
Last Modified: 2014-03-12
hi guys, apologies if this is a silly question but i'm trying to learn more about Xcode so pardon me if you will = )

how do i tell if a method is an event that will be called as part of the lifecycle or a custom defined method?

e.g.

-(void)iamdoingsomething
{

}

- (void)viewDidLoad
{
    [super viewDidLoad];
	// Do any additional setup after loading the view, typically from a nib.
    [self configureView];
}

Open in new window


viewDidLoad is an iOS event whilst iamdoingsomething is my own custom method.

other than click on it whilst holding option, is there any other way i can differentiate? and can i sort all the events at the bottom and all my custom methods at the top? thanks!
0
Comment
Question by:developingprogrammer
2 Comments
 
LVL 12

Accepted Solution

by:
satsumo earned 500 total points
ID: 39901549
There isn't any particular distinction, they are both methods of that class. In the example above, viewDidLoad is a method inherited from the super class but thats the only real difference. iamdoingsomething cannot call [super iamdoingsomething] but that not every inherited method calls its super class method.

I do the same thing, keep the specific methods separated from the inherited ones. Did you know that in Obj-C, as in C, you don't have to declare the methods in the interface unless you want them to be externally visible. If the inherited methods are going to call an instance method in the same file the compiler only has to see it first. Same goes for class methods.
0
 

Author Comment

by:developingprogrammer
ID: 39922764
hi satsumo, thanks for your help and apologies for the late reply! ah it's good to know that i'm thinking down the same track as you and i will definitely need to organise my code properly so it's easily readable / maintainable. thanks once again satsumo!
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Convert image to byte array 8 208
Which version of C should I use when Perl is too slow? 13 183
Handling string inputs in C/Linux 23 187
Constant string is of type char *   ? 7 42
Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use while-loops in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question