如何添加'后退按钮'在ios中的Yahoo登录页面

时间:2016-03-31 06:21:48

标签: ios

enter image description here我正在将雅虎集成到我的应用程序中以进行登录,一切正常。但现在我想添加一个'返回'雅虎登录页面上的按钮,允许用户返回我的应用程序,如果他不想通过雅虎登录。

2 个答案:

答案 0 :(得分:0)

试试这个

在您的项目上搜索YahooSession.m 现在在YahooSession.m中找到sendUserToAuthorization并替换UIWebView

//使用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];

希望这会有所帮助

答案 1 :(得分:0)

我通过在 getResponseDelay 方法(在YahooSession.m下)创建按钮并为其分配操作来获得临时解决方案,如下所示

u32

- (无效)方法 {    [self.authorizationWebView removeFromSuperview];

}