Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>this should do the trick for you:</p> <p>first, import loginViewController header inside CoreApi.m</p> <pre><code>#import "loginViewController.h" </code></pre> <p>Then, change login method to this:</p> <pre><code>- (void)login:(id)sender { [(loginViewController*)sender loginCallback]; } </code></pre> <p>Or this:</p> <pre><code>- (void)login:(loginViewController*)sender { [sender loginCallback]; } </code></pre> <p>Explanation: notice that your login method is receiving by parameter one object of type <code>id</code> . In objective C, <code>id</code> type means a reference to any Objective-C of unknow class. So, inside your login method, the compiler doesn't know that the sender is a instance of your loginViewController class, so it won't recognize loginViewController's methods.</p> <p>To informations about this, please read: <a href="https://stackoverflow.com/questions/1304176/objective-c-difference-between-id-and-void">Objective-C: difference between id and void *</a></p> <p>Notice that I only focused in remove your actual error. You should have to do more things in order to accomplish your code to run asynchronous.</p> <p>In order to perform a better callback, please look for delegates or blocks (like in oltman's answer). </p> <p>To run things in background, look for CDG : <a href="http://developer.apple.com/library/ios/#DOCUMENTATION/General/Conceptual/ConcurrencyProgrammingGuide/OperationQueues/OperationQueues.html" rel="nofollow noreferrer">http://developer.apple.com/library/ios/#DOCUMENTATION/General/Conceptual/ConcurrencyProgrammingGuide/OperationQueues/OperationQueues.html</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload