2016-03-31 5 views
0

enter image description here Ich integriere Yahoo in meine App für Login-Zweck, alles funktioniert gut.Aber jetzt möchte ich einen 'Zurück' Button auf der Yahoo-Login-Seite hinzufügen Erlaube dem Benutzer, zu meiner App zurückzukehren, wenn er sich nicht über Yahoo einloggen möchte.Wie man 'Zurück-Taste' in Yahoo Login-Seite in ios

+0

teilen Sie Ihren Code, den Sie versucht haben. –

+0

Ich habe die Schritte in https://github.com/yahoo/yos-social-objc – Jiyas

+0

folgen Sie bitte teilen Screenshots ist leicht zu verstehen –

Antwort

0

Versuchen Sie, diese

Suche YahooSession.m an Ihrem Projekt jetzt sendUserToAuthorization in YahooSession.m und ersetzen UIWebView

// Verwenden UIWebView

self.rootViewController = [[[UIApplication sharedApplication] keyWindow] rootViewController]; 
     self.authorizationWebView = [[UIWebView alloc]initWithFrame:CGRectMake(0, 60, self.rootViewController.view.frame.size.width, self.rootViewController.view.frame.size.height)]; 
     [self.authorizationWebView setDelegate:self]; 
     NSURLRequest *request = [NSURLRequest requestWithURL:self.authorizationUrl]; 
     [self.authorizationWebView loadRequest:request]; 
     [self.rootViewController.view addSubview:self.authorizationWebView]; 

hoffe, das hilft

0

finde ich bekam die temporäre Lösung durch Erstellen einer Schaltfläche in getResponseDel ay Methode (unter YahooSession.m) und eine Aktion, um es der Zuordnung, wie unten

 UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom]; 
     [button addTarget:self action:@selector(method) forControlEvents:UIControlEventTouchUpInside]; 
     [button setTitle:@"< Back" forState:UIControlStateNormal]; 
     button.frame = CGRectMake(0, 15, 60, 10); 
     button.titleLabel.font = [UIFont systemFontOfSize:12]; 
     [ button setTitleColor:[UIColor blackColor] forState:UIControlStateNormal]; 
     [self.authorizationWebView addSubview:button]; 

- (void) { Verfahren [self.authorizationWebView removeFromSuperview];

}