Solved

how to differentiate events from methods

Posted on 2014-03-01
2
237 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use nested-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.

929 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now