{"action":"created","issue":{"url":"https://api.github.com/repos/Skyscanner/SkyFloatingLabelTextField/issues/46","repository_url":"https://api.github.com/repos/Skyscanner/SkyFloatingLabelTextField","labels_url":"https://api.github.com/repos/Skyscanner/SkyFloatingLabelTextField/issues/46/labels{/name}","comments_url":"https://api.github.com/repos/Skyscanner/SkyFloatingLabelTextField/issues/46/comments","events_url":"https://api.github.com/repos/Skyscanner/SkyFloatingLabelTextField/issues/46/events","html_url":"https://github.com/Skyscanner/SkyFloatingLabelTextField/pull/46","id":155183288,"number":46,"title":"fix: set the text alignment to .Natural so it will be presented according to the language alignment rules (RTL support)","user":{"login":"pichirichi","id":905826,"avatar_url":"https://avatars.githubusercontent.com/u/905826?v=3","gravatar_id":"","url":"https://api.github.com/users/pichirichi","html_url":"https://github.com/pichirichi","followers_url":"https://api.github.com/users/pichirichi/followers","following_url":"https://api.github.com/users/pichirichi/following{/other_user}","gists_url":"https://api.github.com/users/pichirichi/gists{/gist_id}","starred_url":"https://api.github.com/users/pichirichi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pichirichi/subscriptions","organizations_url":"https://api.github.com/users/pichirichi/orgs","repos_url":"https://api.github.com/users/pichirichi/repos","events_url":"https://api.github.com/users/pichirichi/events{/privacy}","received_events_url":"https://api.github.com/users/pichirichi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":20,"created_at":"2016-05-17T06:04:47Z","updated_at":"2016-05-17T14:35:37Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Skyscanner/SkyFloatingLabelTextField/pulls/46","html_url":"https://github.com/Skyscanner/SkyFloatingLabelTextField/pull/46","diff_url":"https://github.com/Skyscanner/SkyFloatingLabelTextField/pull/46.diff","patch_url":"https://github.com/Skyscanner/SkyFloatingLabelTextField/pull/46.patch"},"body":"Since iOS 9 the default value for text alignment is .Natural\r\nIn iOS 8 you must set the value ignorer to get the correct alignment when changing languages.\r\nOriginally Labels in iOS 8 didn't have the .Natural alignment value."},"comment":{"url":"https://api.github.com/repos/Skyscanner/SkyFloatingLabelTextField/issues/comments/219737481","html_url":"https://github.com/Skyscanner/SkyFloatingLabelTextField/pull/46#issuecomment-219737481","issue_url":"https://api.github.com/repos/Skyscanner/SkyFloatingLabelTextField/issues/46","id":219737481,"user":{"login":"intonarumori","id":86030,"avatar_url":"https://avatars.githubusercontent.com/u/86030?v=3","gravatar_id":"","url":"https://api.github.com/users/intonarumori","html_url":"https://github.com/intonarumori","followers_url":"https://api.github.com/users/intonarumori/followers","following_url":"https://api.github.com/users/intonarumori/following{/other_user}","gists_url":"https://api.github.com/users/intonarumori/gists{/gist_id}","starred_url":"https://api.github.com/users/intonarumori/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/intonarumori/subscriptions","organizations_url":"https://api.github.com/users/intonarumori/orgs","repos_url":"https://api.github.com/users/intonarumori/repos","events_url":"https://api.github.com/users/intonarumori/events{/privacy}","received_events_url":"https://api.github.com/users/intonarumori/received_events","type":"User","site_admin":false},"created_at":"2016-05-17T14:35:36Z","updated_at":"2016-05-17T14:35:36Z","body":"There are multiple use-cases for a `UITextField` to be RTL:\r\n- LTR layout, RTL language (ex. using Arabic with the example project)\r\n- RTL layout, RTL language (ex. using Hebrew with the example project)\r\n\r\n- In both cases iOS would use RTL for the textfield, but in our current implementation on `master` we determine the direction by using `UIApplication.sharedApplication().userInterfaceLayoutDirection == .LeftToRight` and setting the alignment explicitly. We should rework this.\r\n\r\n- I tested your PR code, and `titleLabel.textAlignment = .Natural` has no effect on iOS8.3.\r\nYou can test it after the setter it will still be `.Left`. We can remove this line.\r\n\r\n- 'self.textAlignment = .Natural' is sensible, please add the condition for iOS8 and move it to `init_SkyFloatingLabelTextField`.\r\n\r\n\r\n\r\n"}}