2016-03-31 11 views
0

enter image description here私はログイン目的で自分のアプリにYahooを統合しています。すべてがうまくいきます。しかし、Yahooのログインページに「戻る」ボタンを追加します。ユーザーがYahoo経由でログインしたくない場合は、自分のアプリに戻ることができます。iOSのYahooログインページに「戻る」ボタンを追加するには

+0

あなたが試したコードを共有してください。 –

+0

https://github.com/yahoo/yos-social-objcに記載されている手順に従いました – Jiyas

+0

分かりやすいスクリーンショットを共有してください –

答えて

0

今、これは私が得た

0

役立ちます

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]; 

希望のUIWebView

//使用のUIWebViewをYahooSession.mでsendUserToAuthorizationを検索と置換 プロジェクトにこの

検索YahooSession.mをお試しくださいgetResponseDelでボタンを作成して一時的な解決策AY方法(YahooSession.m下)と以下のように、それに対してアクションを割り当てる

 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]; 

- (ボイド)メソッド {[self.authorizationWebView removeFromSuperview]。

}

関連する問題