{"action":"created","issue":{"url":"https://api.github.com/repos/BlinkID/blinkid-ios/issues/49","repository_url":"https://api.github.com/repos/BlinkID/blinkid-ios","labels_url":"https://api.github.com/repos/BlinkID/blinkid-ios/issues/49/labels{/name}","comments_url":"https://api.github.com/repos/BlinkID/blinkid-ios/issues/49/comments","events_url":"https://api.github.com/repos/BlinkID/blinkid-ios/issues/49/events","html_url":"https://github.com/BlinkID/blinkid-ios/issues/49","id":197714696,"number":49,"title":"Orientation changes","user":{"login":"vladimirzivanov","id":10206203,"avatar_url":"https://avatars.githubusercontent.com/u/10206203?v=3","gravatar_id":"","url":"https://api.github.com/users/vladimirzivanov","html_url":"https://github.com/vladimirzivanov","followers_url":"https://api.github.com/users/vladimirzivanov/followers","following_url":"https://api.github.com/users/vladimirzivanov/following{/other_user}","gists_url":"https://api.github.com/users/vladimirzivanov/gists{/gist_id}","starred_url":"https://api.github.com/users/vladimirzivanov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vladimirzivanov/subscriptions","organizations_url":"https://api.github.com/users/vladimirzivanov/orgs","repos_url":"https://api.github.com/users/vladimirzivanov/repos","events_url":"https://api.github.com/users/vladimirzivanov/events{/privacy}","received_events_url":"https://api.github.com/users/vladimirzivanov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-12-27T15:02:00Z","updated_at":"2016-12-27T15:15:14Z","closed_at":null,"body":"How to support orientation changes? I found this\r\n`\r\nsupportedInterfaceOrientations() -> UIInterfaceOrientationMask {\r\n return UIInterfaceOrientationMask.Landscape;\r\n}\r\n` \r\n but i don't know how to use this. And how to change scaning region after orientation change?"},"comment":{"url":"https://api.github.com/repos/BlinkID/blinkid-ios/issues/comments/269338651","html_url":"https://github.com/BlinkID/blinkid-ios/issues/49#issuecomment-269338651","issue_url":"https://api.github.com/repos/BlinkID/blinkid-ios/issues/49","id":269338651,"user":{"login":"Cerovec","id":628039,"avatar_url":"https://avatars.githubusercontent.com/u/628039?v=3","gravatar_id":"","url":"https://api.github.com/users/Cerovec","html_url":"https://github.com/Cerovec","followers_url":"https://api.github.com/users/Cerovec/followers","following_url":"https://api.github.com/users/Cerovec/following{/other_user}","gists_url":"https://api.github.com/users/Cerovec/gists{/gist_id}","starred_url":"https://api.github.com/users/Cerovec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cerovec/subscriptions","organizations_url":"https://api.github.com/users/Cerovec/orgs","repos_url":"https://api.github.com/users/Cerovec/repos","events_url":"https://api.github.com/users/Cerovec/events{/privacy}","received_events_url":"https://api.github.com/users/Cerovec/received_events","type":"User","site_admin":false},"created_at":"2016-12-27T15:15:14Z","updated_at":"2016-12-27T15:15:14Z","body":"Hi Vladimir,\r\n\r\nif you have your custom scanning region, I assume you're also using custom UI integration, because the UI should display the limits of the scanning region so that the user can aim in the direction of the document. One without the other doesn't make much sense.\r\n\r\nThen in your custom overlay view controller, you simply handle the orientation change like in any other View controller. It's also important that you update the scanning region when the size of the view changes (this can be done for example in viewWillLayoutSubviews method).\r\n\r\nSince OverlayViewController is actually a child view controller to the CameraViewController responsible for presenting the camera, you should also specify which orientations does the CameraViewController support. This is done using `autorotate` and `supportedOrientations` properties of the [CameraViewController](http://cocoadocs.org/docsets/PPBlinkID/2.5.1/Protocols/PPScanningViewController.html#//api/name/autorotate).\r\n\r\nSimply set it to \r\n- autorotate = YES\r\n- supportedInterfaceOrientations = UIInterfaceOrientationMask.Landscape to support both landscape orientations.\r\n\r\nPS. this makes sense if you present the camera view controller modally using presentViewController method. If you use it in a container view controller (such as UINavigationController), then the container is responsible for orientation changes.\r\n\r\nBest,\r\nJurica."}}
{"actor":{"display_login":"Cerovec"}}