Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lock not displayed in fullscreen on an iPad #307

Closed
6franek opened this issue Aug 26, 2016 · 4 comments
Closed

Lock not displayed in fullscreen on an iPad #307

6franek opened this issue Aug 26, 2016 · 4 comments
Labels
bug This points to a verified bug in the code P3: Important S2: Inconvenient
Milestone

Comments

@6franek
Copy link

6franek commented Aug 26, 2016

I have a following problem when using Lock for iOS in my "universal" app on an iPad. Even though I set presentationStyle to .FullScreen the ViewController isn't displayed on a fullscreen. Moreover there are some UI issues when I open the keyboard. Below I attach screenshots where you can see the problem.

iPad Air screenshot
screenshot_auth0
iPad Air screenshot with a keyboard opened
screenshot_keyboard

This is how I configure and show Lock in code:

        let customLockTheme = A0Theme()
        customLockTheme.registerColor(UIColor().background(), forKey: "A0ThemeScreenBackgroundColor")
        customLockTheme.registerColor(UIColor().accent(), forKey: "A0ThemePrimaryButtonNormalColor")
        customLockTheme.registerColor(UIColor().accent(), forKey: "A0ThemeTextFieldTextColor")
        customLockTheme.registerColor(UIColor().accent(), forKey: "A0ThemeTextFieldPlaceholderTextColor")
        customLockTheme.registerColor(UIColor().accent(), forKey: "A0ThemeTextFieldIconColor")
        customLockTheme.registerColor(UIColor.whiteColor(), forKey: "A0ThemeTitleTextColor")
        customLockTheme.registerImageWithName("logo", bundle: NSBundle.mainBundle(), forKey: "A0ThemeIconImageName")
        A0Theme.sharedInstance().registerTheme(customLockTheme)

        let lock = A0Lock.sharedLock()
        let controller = lock.newLockViewController()
        controller.disableResetPassword = true
        controller.disableSignUp = true

        controller.onAuthenticationBlock = {(profile, token) in
            //...
        }
        lock.presentLockController(controller, fromController: viewController, presentationStyle: .FullScreen)

BTW. The version I use is:
pod 'Lock', '~> 1.26'

@moperacz
Copy link

moperacz commented Sep 7, 2016

@hzalaz any thoughts on this?

@hzalaz
Copy link
Member

hzalaz commented Sep 7, 2016

@moperacz we override the style in the presentLockController method, if you present it yourself you won't get the presentation style issue.

For the background, it's probably an issue where the color of the embedding nav controller is different from the lock controller so if you present Lock yourself you could set the color.

Since we are working in v2 I am not sure of when we will fix this in v1 but that's a workaround.

@hzalaz hzalaz added the bug This points to a verified bug in the code label Sep 7, 2016
@6franek
Copy link
Author

6franek commented Sep 8, 2016

@hzalaz What do you mean by:

if you present it yourself

@hzalaz
Copy link
Member

hzalaz commented Sep 9, 2016

Doing what the method

lock.presentLockController(controller, fromController: viewController, presentationStyle: .FullScreen)

does in your own application code (just copy & paste the code of the method). The only thing you won't be able to use is our custom navigation controller but you can copy-paste the class impl till we get this fix out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This points to a verified bug in the code P3: Important S2: Inconvenient
Projects
None yet
Development

No branches or pull requests

3 participants