-
-
Save iwill/d22e4795c751cc09fef1c9b8e3dfec12 to your computer and use it in GitHub Desktop.
Revisions
-
vinhnx revised this gist
Aug 3, 2017 . 1 changed file with 17 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,6 @@ > If you just want to use a solid navigation bar color and have set this up in your storyboard, use this code in your `AppDelegate` class to remove the 1 pixel border via the appearance proxy: Objective-C ```obj-c [[UINavigationBar appearance] setBackgroundImage:[[UIImage alloc] init] forBarPosition:UIBarPositionAny @@ -8,3 +9,19 @@ [[UINavigationBar appearance] setShadowImage:[[UIImage alloc] init]]; ``` Swift 3.x ```swift UINavigationBar.appearance().shadowImage = UIImage() UINavigationBar.appearance().setBackgroundImage(UIImage(), for: .default) ``` **NOTE**: must set `isTransluscent` UINavigationBar instance to `false` to avoid transparent navigation bar; either in storyboard or in code ```swift navigationController?.navigationBar.isTranslucent = false // or navigationBar.isTranslucent = false ``` -
vinhnx revised this gist
May 7, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ > If you just want to use a solid navigation bar color and have set this up in your storyboard, use this code in your `AppDelegate` class to remove the 1 pixel border via the appearance proxy: ```obj-c [[UINavigationBar appearance] setBackgroundImage:[[UIImage alloc] init] forBarPosition:UIBarPositionAny barMetrics:UIBarMetricsDefault]; -
vinhnx revised this gist
May 7, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ > If you just want to use a solid navigation bar color and have set this up in your storyboard, use this code in your `AppDelegate` class to remove the 1 pixel border via the appearance proxy: ```C [[UINavigationBar appearance] setBackgroundImage:[[UIImage alloc] init] forBarPosition:UIBarPositionAny barMetrics:UIBarMetricsDefault]; -
vinhnx revised this gist
May 7, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ > If you just want to use a solid navigation bar color and have set this up in your storyboard, use this code in your `AppDelegate` class to remove the 1 pixel border via the appearance proxy: ```objc [[UINavigationBar appearance] setBackgroundImage:[[UIImage alloc] init] forBarPosition:UIBarPositionAny barMetrics:UIBarMetricsDefault]; -
vinhnx revised this gist
May 7, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ > If you just want to use a solid navigation bar color and have set this up in your storyboard, use this code in your `AppDelegate` class to remove the 1 pixel border via the appearance proxy: ```objective-c [[UINavigationBar appearance] setBackgroundImage:[[UIImage alloc] init] forBarPosition:UIBarPositionAny barMetrics:UIBarMetricsDefault]; -
vinhnx revised this gist
May 7, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ > If you just want to use a solid navigation bar color and have set this up in your storyboard, use this code in your `AppDelegate` class to remove the 1 pixel border via the appearance proxy: ```bjective-c [[UINavigationBar appearance] setBackgroundImage:[[UIImage alloc] init] forBarPosition:UIBarPositionAny barMetrics:UIBarMetricsDefault]; -
vinhnx renamed this gist
May 7, 2014 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
vinhnx created this gist
May 7, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ > If you just want to use a solid navigation bar color and have set this up in your storyboard, use this code in your `AppDelegate` class to remove the 1 pixel border via the appearance proxy: ``òbjective-c [[UINavigationBar appearance] setBackgroundImage:[[UIImage alloc] init] forBarPosition:UIBarPositionAny barMetrics:UIBarMetricsDefault]; [[UINavigationBar appearance] setShadowImage:[[UIImage alloc] init]]; ```