{"action":"created","issue":{"url":"https://api.github.com/repos/archagon/tasty-imitation-keyboard/issues/96","repository_url":"https://api.github.com/repos/archagon/tasty-imitation-keyboard","labels_url":"https://api.github.com/repos/archagon/tasty-imitation-keyboard/issues/96/labels{/name}","comments_url":"https://api.github.com/repos/archagon/tasty-imitation-keyboard/issues/96/comments","events_url":"https://api.github.com/repos/archagon/tasty-imitation-keyboard/issues/96/events","html_url":"https://github.com/archagon/tasty-imitation-keyboard/issues/96","id":160103941,"number":96,"title":"How to change between two keyboards?","user":{"login":"mikrosk","id":3062260,"avatar_url":"https://avatars.githubusercontent.com/u/3062260?v=3","gravatar_id":"","url":"https://api.github.com/users/mikrosk","html_url":"https://github.com/mikrosk","followers_url":"https://api.github.com/users/mikrosk/followers","following_url":"https://api.github.com/users/mikrosk/following{/other_user}","gists_url":"https://api.github.com/users/mikrosk/gists{/gist_id}","starred_url":"https://api.github.com/users/mikrosk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikrosk/subscriptions","organizations_url":"https://api.github.com/users/mikrosk/orgs","repos_url":"https://api.github.com/users/mikrosk/repos","events_url":"https://api.github.com/users/mikrosk/events{/privacy}","received_events_url":"https://api.github.com/users/mikrosk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2016-06-14T06:05:00Z","updated_at":"2016-08-16T03:32:06Z","closed_at":null,"body":"I was very kindly surprised how universal processing of the Keyboard class is. I can define my own layout, my custom types, with all the colours, letters, images, amazing.\r\n\r\nI've been wondering, is there a way how to switch between them? From what I've seen it seems the controller initializes the layout only once and then just hides/shows the default settings, if needed.\r\n\r\nI haven't done much experiments with it yet but if you can give me some hints, I'll appreciate that. :)\r\n\r\nKeep up the great work!"},"comment":{"url":"https://api.github.com/repos/archagon/tasty-imitation-keyboard/issues/comments/239992512","html_url":"https://github.com/archagon/tasty-imitation-keyboard/issues/96#issuecomment-239992512","issue_url":"https://api.github.com/repos/archagon/tasty-imitation-keyboard/issues/96","id":239992512,"user":{"login":"polishedcode","id":11811097,"avatar_url":"https://avatars.githubusercontent.com/u/11811097?v=3","gravatar_id":"","url":"https://api.github.com/users/polishedcode","html_url":"https://github.com/polishedcode","followers_url":"https://api.github.com/users/polishedcode/followers","following_url":"https://api.github.com/users/polishedcode/following{/other_user}","gists_url":"https://api.github.com/users/polishedcode/gists{/gist_id}","starred_url":"https://api.github.com/users/polishedcode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/polishedcode/subscriptions","organizations_url":"https://api.github.com/users/polishedcode/orgs","repos_url":"https://api.github.com/users/polishedcode/repos","events_url":"https://api.github.com/users/polishedcode/events{/privacy}","received_events_url":"https://api.github.com/users/polishedcode/received_events","type":"User","site_admin":false},"created_at":"2016-08-16T03:32:06Z","updated_at":"2016-08-16T03:32:06Z","body":"Included dawand@'s fix.\n\nOn Sun, Aug 7, 2016 at 2:29 PM, Simon Corston-Oliver <\nsimon@corston-oliver.com> wrote:\n\n> Sounds good. It'll be a few days before I can review the fix.\n>\n>\n> On Monday, 8 August 2016, AaronFW <notifications@github.com> wrote:\n>\n>> @dawand <https://github.com/dawand> @polishedcode\n>> <https://github.com/polishedcode>\n>> I've been a little slow to get to it, but I've gotten the iPad Landscape\n>> Keyboard Height to be acceptable now. (I have not tested it with iPad-Mini\n>> since there is no simulator.)\n>>\n>> It might be somewhat 'hack' but I basically reused the code for the\n>> canonicalPortraitHeight and modified it for landscape and for iPad.\n>>\n>> In keyboardViewController.swift, I updated the following function by\n>> adding the constant \"let actualScreenHeight\" and changing the\n>> \"canonicalLandscapeHeight\".\n>>\n>> func heightForOrientation(orientation: UIInterfaceOrientation, withTopBanner: Bool) -> CGFloat {\n>>\n>>         let actualScreenWidth = (UIScreen.mainScreen().nativeBounds.size.width /\n>>             UIScreen.mainScreen().nativeScale)\n>>\n>>         let actualScreenHeight = (UIScreen.mainScreen().nativeBounds.size.height / UIScreen.mainScreen().nativeScale)\n>>\n>>         let canonicalPortraitHeight = CGFloat(orientation.isPortrait && actualScreenWidth >= 400 ? 226 : 216)\n>>\n>>         let canonicalLandscapeHeight = CGFloat(orientation.isLandscape && actualScreenHeight >= 800 ? 330 : 162)\n>>\n>>\n>>         let topBannerHeight = (withTopBanner && textDocumentProxy.keyboardType != UIKeyboardType.NumberPad && textDocumentProxy.keyboardType != UIKeyboardType.DecimalPad)\n>>             ? metric(\"topBanner\") : 0\n>>\n>>         return CGFloat(orientation.isPortrait ? canonicalPortraitHeight + topBannerHeight : canonicalLandscapeHeight + topBannerHeight)\n>>\n>>     }\n>>\n>> There might be a better way to do it, or better numbers to use, but this\n>> seems to work making the keyboard the right size on iPads and iPhones.\n>>\n>> —\n>> You are receiving this because you were mentioned.\n>> Reply to this email directly, view it on GitHub\n>> <https://github.com/archagon/tasty-imitation-keyboard/issues/96#issuecomment-238088911>,\n>> or mute the thread\n>> <https://github.com/notifications/unsubscribe-auth/ALQ5Gd2UHHyIve_ZUv3rHnifz8rs99szks5qdfnfgaJpZM4I0_Sc>\n>> .\n>>\n>\n"}}
{"actor":{"display_login":"polishedcode"}}