My Objective-C method does not work

0

I want to call a method of another kind that shows a screen, the problem is that trying to call it from another class does not do anything.

I do it in this way example:

NameClase *c = [[NameClase alloc]init];
[c metodo];

or

[[c init]metodo];

but the screen to help is not shown. and the screen that I want to show if it works.

    
asked by JCTimmypage 07.07.2017 в 18:34
source

1 answer

0

It is important that when creating your method in your Main, also make in the Header the declaration of that method, so that it can be called when instantiating your object in other classes.

Guide: link

Example:

In Header you only add the reference of your method so

  • (void) method;

This way you can call your method by instantiating your object with other classes.

    
answered by 25.02.2018 в 18:02