{"id":114,"date":"2025-10-04T09:24:21","date_gmt":"2025-10-04T00:24:21","guid":{"rendered":"https:\/\/devserver.kr\/blog\/?p=114"},"modified":"2025-10-04T09:24:21","modified_gmt":"2025-10-04T00:24:21","slug":"ios-%ec%bb%ac%eb%9f%ac%ed%85%8c%eb%a7%88-%ea%b5%ac%ed%98%84%eb%b0%a9%eb%b2%95","status":"publish","type":"post","link":"https:\/\/devserver.kr\/blog\/ios\/ios-%ec%bb%ac%eb%9f%ac%ed%85%8c%eb%a7%88-%ea%b5%ac%ed%98%84%eb%b0%a9%eb%b2%95\/","title":{"rendered":"iOS \uceec\ub7ec\ud14c\ub9c8 \uad6c\ud604\ubc29\ubc95"},"content":{"rendered":"\n<div class=\"wp-block-jetpack-markdown\"><h3>color \uc124\uc815\ud558\ub294 \ubc29\ubc95<\/h3>\n<h4>StatusBar<\/h4>\n<pre><code class=\"language-swift\">override var preferredStatusBarStyle: UIStatusBarStyle {\n    return .default\n}\n  \noverride var prefersStatusBarHidden: Bool {\n    return true\n}\n\noverride var preferredStatusBarUpdateAnimation: UIStatusBarAnimation {\n    return .fade\n}\n\n<\/code><\/pre>\n<pre><code class=\"language-swift\">NotificationCenter.default.addObserver(self,\n    selector: #selector(colorThemeChanged),\n    name: NSNotification.Name(rawValue: &quot;COLOR_THEME_CHANGED&quot;),\n    object: nil)\n\nNotificationCenter.default.post(name: NSNotification.Name(rawValue: &quot;COLOR_THEME_CHANGED&quot;), object: nil)\n\nfunc setColors() {\n    self.view.backgroundColor = ThemeManager.o.colorOf(&quot;Theme_backgroundColor&quot;)\n        \n    \/\/ \ub124\ube44\uac8c\uc774\uc158\ubc14\uc758 \ubc30\uacbd\uc0c9 \uc124\uc815\n    self.navigationController?.navigationBar.barTintColor = ThemeManager.o.colorOf(&quot;NavigationBar_barTintColor&quot;)\n    self.navigationController?.navigationBar.isTranslucent = false\n    self.navigationController?.navigationBar.tintColor = ThemeManager.o.colorOf(&quot;NavigationBar_tintColor&quot;)\n    self.navigationController?.navigationBar.titleTextAttributes = [.foregroundColor: ThemeManager.o.colorOf(&quot;NavigationBar_titleColor&quot;)]\n        \n    self.navigationItem.rightBarButtonItem?.tintColor = ThemeManager.o.colorOf(&quot;NavigationBar_ButtonItemTintColor&quot;)\n}\n\n\/\/ MARK: - Notification Handler\n@objc func colorThemeChanged() {\n    print(&quot;HomeVC \\(#function)&quot;)\n    setColors()\n\n    if ThemeManager.o.currentThemeName == &quot;Theme1&quot; {\n        \/\/self.statusBarStyle = .lightContent\n        self.navigationController?.navigationBar.barStyle = .black\n    }\n    else {\n        \/\/self.statusBarStyle = .darkContent\n        self.navigationController?.navigationBar.barStyle = .default\n    }\n    \/\/self.setNeedsStatusBarAppearanceUpdate() \n}<\/code><\/pre>\n<\/div>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4,7],"tags":[],"class_list":["post-114","post","type-post","status-publish","format-standard","hentry","category-ios","category-swift"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/devserver.kr\/blog\/wp-json\/wp\/v2\/posts\/114","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devserver.kr\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devserver.kr\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devserver.kr\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/devserver.kr\/blog\/wp-json\/wp\/v2\/comments?post=114"}],"version-history":[{"count":1,"href":"https:\/\/devserver.kr\/blog\/wp-json\/wp\/v2\/posts\/114\/revisions"}],"predecessor-version":[{"id":115,"href":"https:\/\/devserver.kr\/blog\/wp-json\/wp\/v2\/posts\/114\/revisions\/115"}],"wp:attachment":[{"href":"https:\/\/devserver.kr\/blog\/wp-json\/wp\/v2\/media?parent=114"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devserver.kr\/blog\/wp-json\/wp\/v2\/categories?post=114"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devserver.kr\/blog\/wp-json\/wp\/v2\/tags?post=114"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}