{"action":"created","issue":{"url":"https://api.github.com/repos/OAuthSwift/OAuthSwift/issues/257","repository_url":"https://api.github.com/repos/OAuthSwift/OAuthSwift","labels_url":"https://api.github.com/repos/OAuthSwift/OAuthSwift/issues/257/labels{/name}","comments_url":"https://api.github.com/repos/OAuthSwift/OAuthSwift/issues/257/comments","events_url":"https://api.github.com/repos/OAuthSwift/OAuthSwift/issues/257/events","html_url":"https://github.com/OAuthSwift/OAuthSwift/pull/257","id":169289679,"number":257,"title":"custom modalPresentationStyle in SafariURLHandler","user":{"login":"teaualune","id":2609726,"avatar_url":"https://avatars.githubusercontent.com/u/2609726?v=3","gravatar_id":"","url":"https://api.github.com/users/teaualune","html_url":"https://github.com/teaualune","followers_url":"https://api.github.com/users/teaualune/followers","following_url":"https://api.github.com/users/teaualune/following{/other_user}","gists_url":"https://api.github.com/users/teaualune/gists{/gist_id}","starred_url":"https://api.github.com/users/teaualune/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/teaualune/subscriptions","organizations_url":"https://api.github.com/users/teaualune/orgs","repos_url":"https://api.github.com/users/teaualune/repos","events_url":"https://api.github.com/users/teaualune/events{/privacy}","received_events_url":"https://api.github.com/users/teaualune/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-04T04:39:42Z","updated_at":"2016-08-04T06:04:25Z","closed_at":"2016-08-04T06:04:25Z","pull_request":{"url":"https://api.github.com/repos/OAuthSwift/OAuthSwift/pulls/257","html_url":"https://github.com/OAuthSwift/OAuthSwift/pull/257","diff_url":"https://github.com/OAuthSwift/OAuthSwift/pull/257.diff","patch_url":"https://github.com/OAuthSwift/OAuthSwift/pull/257.patch"},"body":"While using `SafariURLHandler` to implement OAuth flow on an landscaped iPad app, the presented `SFSafariViewController` transients to a new screen from right to left (*i.e.* the default behavior of `UIModalPresentationStyle.FullScreen`). In order to make the view controller behaves like a modal view, it would be great if we can customize behaviors of the view controller created from `factory(url)`.\r\n\r\nThis PR proposes a naïve way to do this by exposing `modalPresentationStyle` in `SafariURLHandler`, thus we can customize the presented modal style by doing so:\r\n\r\n```swift\r\nlet handler = SafariURLHandler(viewController: self)\r\nhandler.modalPresentationStyle = .FormSheet\r\noauthswift.authorize_url_handler = handler\r\n```\r\n\r\nOr maybe it is better to make a config block/delegate for clients before the controller is presented in `handle(url)`? Thanks in advance!\r\n"},"comment":{"url":"https://api.github.com/repos/OAuthSwift/OAuthSwift/issues/comments/237460706","html_url":"https://github.com/OAuthSwift/OAuthSwift/pull/257#issuecomment-237460706","issue_url":"https://api.github.com/repos/OAuthSwift/OAuthSwift/issues/257","id":237460706,"user":{"login":"phimage","id":8875768,"avatar_url":"https://avatars.githubusercontent.com/u/8875768?v=3","gravatar_id":"","url":"https://api.github.com/users/phimage","html_url":"https://github.com/phimage","followers_url":"https://api.github.com/users/phimage/followers","following_url":"https://api.github.com/users/phimage/following{/other_user}","gists_url":"https://api.github.com/users/phimage/gists{/gist_id}","starred_url":"https://api.github.com/users/phimage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phimage/subscriptions","organizations_url":"https://api.github.com/users/phimage/orgs","repos_url":"https://api.github.com/users/phimage/repos","events_url":"https://api.github.com/users/phimage/events{/privacy}","received_events_url":"https://api.github.com/users/phimage/received_events","type":"User","site_admin":false},"created_at":"2016-08-04T06:04:25Z","updated_at":"2016-08-04T06:04:25Z","body":"There is already a config block named 'factory'"}}
{"actor":{"display_login":"phimage"}}