Solved

how to differentiate events from methods

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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 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…
The goal of this video is to provide viewers with basic examples to understand how to use strings and some functions related to them in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use for-loops in the C programming language.

706 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

16 Experts available now in Live!

Get 1:1 Help Now