Solved

how to differentiate events from methods

Posted on 2014-03-01
2
244 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

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 and use pointers in the C programming language.
The goal of this video is to provide viewers with basic examples to understand recursion in the C programming language.

749 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