Search code examples
iosobjective-cipaduiwebviewlinkedin-api

iPad: Linkedin API in iPad is not resizing to a bigger login view


enter image description here

As you can see in the above image, there is a major part of the screen which is grey and unused. I want the login view to be more bigger to fill out major part of the screen rather than displaying a gray background.

The problem lies with the fact that this is a webview and we are loading the following Linkedin URL in the webview:

https://www.linkedin.com/uas/oauth/authorize?oauth_token=509f2231-b1bc-42fb-874f-f6963a447dc3&auth_token_secret=20136199-7dc9-4e81-9cc9-ef1ea797b6de

I tried to find out solution through google and also Developer Linkedin but still didn't get a solution

How can we resize the view to be bigger than what it is currentlly?

Any Suggestions is appreciated.

For your Information, I have already gone through this application:

LinkedIn Login Dialog for iPad but I want to know that if there is anything possible now?


Solution

  • As this was a webpage opening in a webView there was no other method I found (except the below mentioned one) by which I could make the content of a webpage bigger.

    Solution:

    I did it using JavaScript.

    Here is the solution, I had applied to make the login dialog bigger:

    if([CommonMethods isiPad])
    {
        [self->webView stringByEvaluatingJavaScriptFromString:@"document.body.style.zoom = 1.39;"];
    }
    

    CommonMethods.m

    + (BOOL) isiPad {
    #if (__IPHONE_OS_VERSION_MAX_ALLOWED >= 30200)
        if ([[UIDevice currentDevice] respondsToSelector: @selector(userInterfaceIdiom)])
            return ([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad);
    #endif
        return NO;
    }
    

    By this method I made the login dialog bigger in iPad.