Skip to content
This repository has been archived by the owner on Jun 13, 2021. It is now read-only.

Forcing hidden hairline in navigationBars #64

Closed
pawelkata opened this issue Sep 30, 2015 · 7 comments
Closed

Forcing hidden hairline in navigationBars #64

pawelkata opened this issue Sep 30, 2015 · 7 comments

Comments

@pawelkata
Copy link

The current version of Chameleon forces hidden hairline in all navigationBars throughout an app. While for some instances this is correct, I use Chameleon mainly for flat colors and missing hairline in navigation bars really messes up my UI. Is it necessary to force the hairline to be hidden?

Here's the code UINavigationController+Chameleon.m:

- (void)chameleon_viewDidLoad {
    [self chameleon_viewDidLoad];

    UIView *heairlineImageView = [self findHairlineImageViewUnder:self.navigationBar];
    if (heairlineImageView) {
        heairlineImageView.hidden = NO; // I changed it from YES 
    }
}

Other than that this is an awesome framework! Thanks! :D

@pawelkata pawelkata changed the title Missing hairline Forcing hidden hairline in navigationBars Sep 30, 2015
@vicc
Copy link
Owner

vicc commented Sep 30, 2015

@pawelkata Thanks! I think you're correct in that it should be optional. I'll update Chameleon tomorrow!

@pawelkata
Copy link
Author

@ViccAlexander Blazingly fast response time! Thank you very much! I honestly can't imagine not using Chameleon in my apps :D

@bre7
Copy link
Collaborator

bre7 commented Sep 30, 2015

My bad. There needs to be a new bool to control this

@vicc
Copy link
Owner

vicc commented Sep 30, 2015

@pawelkata No worries. I'm glad you're finding it useful!
@bre7 It should be an easy fix. Oh and there's also a minor spelling mistake. 😀 I'll do it tomorrow (later today) and update the status here.

@bre7
Copy link
Collaborator

bre7 commented Sep 30, 2015

Oh and there's also a minor spelling mistake. 😀

True 😅😅😓😓 (not a good idea to copy-paste at 4am)

@vicc
Copy link
Owner

vicc commented Oct 2, 2015

Sorry it took an extra day. I just updated Chameleon to 2.0.3. By default the hairline is no longer hidden. However, for those that do want to hide it, you can simple do the following inside a UIViewController:

[self.navigationController setHidesNavigationBarHairline:YES];

//or

self.navigationController.hidesNavigationBarHairline = YES;

Or if you rather do it from inside a UINavigationController you can do:

[self setHidesNavigationBarHairline:YES];

//or

self.setHidesNavigationBarHairline:YES;

Good luck @pawelkata!

@vicc vicc closed this as completed Oct 2, 2015
@pawelkata
Copy link
Author

Awesome! Thanks! :D

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants