{"action":"closed","issue":{"url":"https://api.github.com/repos/samwize/UINavigationBar-Addition/issues/3","labels_url":"https://api.github.com/repos/samwize/UINavigationBar-Addition/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/samwize/UINavigationBar-Addition/issues/3/comments","events_url":"https://api.github.com/repos/samwize/UINavigationBar-Addition/issues/3/events","html_url":"https://github.com/samwize/UINavigationBar-Addition/issues/3","id":35522229,"number":3,"title":"To accomplish your code in swift","user":{"login":"nataliemichael","id":2219421,"avatar_url":"https://avatars.githubusercontent.com/u/2219421?v=3","gravatar_id":"","url":"https://api.github.com/users/nataliemichael","html_url":"https://github.com/nataliemichael","followers_url":"https://api.github.com/users/nataliemichael/followers","following_url":"https://api.github.com/users/nataliemichael/following{/other_user}","gists_url":"https://api.github.com/users/nataliemichael/gists{/gist_id}","starred_url":"https://api.github.com/users/nataliemichael/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nataliemichael/subscriptions","organizations_url":"https://api.github.com/users/nataliemichael/orgs","repos_url":"https://api.github.com/users/nataliemichael/repos","events_url":"https://api.github.com/users/nataliemichael/events{/privacy}","received_events_url":"https://api.github.com/users/nataliemichael/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2014-06-11T20:16:57Z","updated_at":"2015-11-05T10:33:27Z","closed_at":"2015-11-05T10:33:27Z","body":"Hey! I based some swift code off of your code, so here it is :)\r\n\r\nimport Foundation\r\nimport UIKit\r\n\r\nextension UINavigationBar {\r\n\t\r\n\tfunc hideBottomHairline() {\r\n\t\tvar imageView: UIImageView? = findHairlineImageViewunder(self)\r\n\t\tif imageView {\r\n\t\t\timageView!.hidden = true\r\n\t\t}\r\n\t}\r\n\t\r\n\tfunc showBottomHairline() {\r\n\t\tvar imageView: UIImageView? = findHairlineImageViewunder(self)\r\n\t\tif imageView {\r\n\t\t\timageView!.hidden = false\r\n\t\t}\r\n\t}\r\n\t\r\n\tfunc findHairlineImageViewunder(view: UIView) -> UIImageView? {\r\n\t\tif (view is UIImageView) && (1.0 >= view.bounds.size.height) {\r\n\t\t\treturn view as? UIImageView\r\n\t\t}\r\n\t\tfor subView: AnyObject in view.subviews {\r\n\t\t\tvar imageView: UIImageView? = findHairlineImageViewunder(subView as UIView)\r\n\t\t\tif imageView {\r\n\t\t\t\treturn imageView\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn nil\r\n\t}\r\n}"}}