Note that there are some explanatory texts on larger screens.

plurals
  1. POself.navigationController is not null but pushViewController is not working
    primarykey
    data
    text
    <p>Basically, I have the following two methods that pushes the same call view controller _vcCall. pushViewController is working fine under on_calling method, but is not working under on_incoming_call. I am sure that self.navigationController is not null and _vcCall is not null neither. I had printed out both navigationController and _vcCall in both methods and they all have the same address. I even tried to create a new viewcontroller in on_incoming_call, but it's still not working. </p> <p>I have only one button in the screen and it pushes to the call view controller when it is clicked. when on_calling method is triggered it pushes to _vcCall successfully, but when on_incoming_call is triggered it does nothing but blocks me from clicking on the Call button. it seems like there is a transparent page being pushed on current view controller.</p> <p><img src="https://i.stack.imgur.com/vANJh.png" alt="enter image description here"></p> <p>Can someone help, please? </p> <pre><code>- (void)viewDidLoad { _vcCall = [[CallViewController alloc] init]; } - (void) sipConnection: (SIPConnection *) connection on_calling: (NSDictionary *) userInfo { NSLog(@"on_calling: navi: %@", self.navigationController); [self.navigationController pushViewController:_vcCall animated:YES]; } - (void)sipConnection:(SIPConnection *)connection on_incoming_call:(NSDictionary *)userInfo { NSLog(@"on_incoming_call: navi: %@", self.navigationController); [self.navigationController pushViewController:_vcCall animated:YES]; } </code></pre> <p>This is the output in console when on_calling is triggered first</p> <pre><code>on_calling: navi: &lt;navViewController: 0x77779d0&gt; on_incoming_call: navi: &lt;navViewController: 0x77779d0&gt; </code></pre> <p>The following part is where the delegate methods are called</p> <pre><code>- (void) processCallMediaState: (NSDictionary *) userInfo { int state = [[userInfo objectForKey: kState] intValue]; switch(state) { case PJSIP_INV_STATE_CALLING: { // After INVITE is sent. [self.delegate sipConnection:self on_calling:userInfo]; break; } case PJSIP_INV_STATE_INCOMING: {// After INVITE is received. [self.delegate sipConnection:self on_incoming_call:userInfo]; break; } case PJSIP_INV_STATE_EARLY: {// After response with To tag. break; } case PJSIP_INV_STATE_CONNECTING:{ // After 2xx is sent/received. break; } case PJSIP_INV_STATE_CONFIRMED: { // After ACK is sent/received. [self.delegate sipConnection:self on_respond:userInfo]; break; } case PJSIP_INV_STATE_DISCONNECTED: { [self.delegate sipConnection:self on_ending:userInfo]; break; } } } </code></pre>
    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.
 

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