ermalkaleci / CarbonKit

CarbonKit - iOS Components (Obj-C & Swift)
MIT License
682 stars 164 forks source link

how can I change color of carbanKit tapSwipeNavigationBar which is same as default UINavigationBar color of ViewControllor ?? #33

Closed subhash08 closed 9 years ago

subhash08 commented 9 years ago

hello sir, with respect. i want the color of tapSwipeNavigationBar is different from my ViewControllers default UINavigationbar`s color like in this pic ios simulator screen shot 17-aug-2015 1 56 28 pm

ermalkaleci commented 9 years ago

Hey @subhash08 you mean tabs and navigationBar with the same color?

subhash08 commented 9 years ago

Hello @ermalkaleci sorry , week in english. i wants tabs and navigationBar with diffrent color tabs in white color and navigationBar in green color. look this image "how can i change tabs background in white" ios simulator screen shot 17-aug-2015 4 16 37 pm

ermalkaleci commented 9 years ago

just set tintColor: white

[[CarbonTabSwipeNavigation alloc] createWithRootViewController:self tabNames:names tintColor:[UIColor whiteColor] delegate:self];
ermalkaleci commented 9 years ago

you have the code above please stop calling me sir, my username is OK

subhash08 commented 9 years ago

thanks @ermalkaleci

ermalkaleci commented 9 years ago

did you fix it?

subhash08 commented 9 years ago

yes i did @ermalkaleci I'm calling sir just becouse of you are very senior in iOS development and I'm just a new comer. If you don't like I'll not call you sir again. :)

ermalkaleci commented 9 years ago

I'm not your boss ;-) I am closing this issue, OK?

subhash08 commented 9 years ago

ok

JannyKul commented 8 years ago

I'm actually having the exact same issue. When setting the tint colour within the creation method (using the below code) the navigationbar of that view takes the same colour

var color: UIColor = UIColor(red: 0.7, green: 0.7, blue: 0.7, alpha: 1) tabSwipe.createWithRootViewController(self, tabNames: names, tintColor: color, delegate: self)

screen shot 2015-10-04 at 12 06 02

I have tried programmatically overriding the navigation bar color within viewdidload however this doesn't seem to work either

UINavigationBar.appearance().backgroundColor = UIColor.greenColor()

how did you manage to fix this issue?

Thanks very much in anticipation of your response.

ermalkaleci commented 8 years ago

Don't copy/paste the example. OnViewDidApper you have called setTranslucent to NO. This fit the navigation color with the same color.

JannyKul commented 8 years ago

ah of course! you're 100% right, thank you so much for the help once again

Narendratha commented 8 years ago

how to set the image color in segment control use in carbon it

ermalkaleci commented 8 years ago

@Narendratha follow the example

RB-King commented 8 years ago

@ermalkaleci [[CarbonTabSwipeNavigation alloc] createWithRootViewController:self tabNames:names tintColor:[UIColor whiteColor] delegate:self]; this line where i put ? in which class ?

ermalkaleci commented 8 years ago

Please checkout the example project.

RB-King commented 8 years ago

checkout .. but i can't Change NavigationBar Color. So, Please tell me the Proper Code and Guide me.

MemetGhini commented 8 years ago

@JannyKul how to let the line between navigationbar and carbonTabSwipeNavigation disappear?

MemetGhini commented 8 years ago

simulator screen shot feb 2 2016 4 27 06 pm

ermalkaleci commented 8 years ago

@MemetiDrak like you do normally. It's navigation bar shadow line

MemetGhini commented 8 years ago

@ermalkaleci Thank you for your guidance,The problem is solved now.thank you. simulator screen shot feb 2 2016 8 09 14 pm

SwiftCrew commented 8 years ago

how to set image with name like here is showing tabbar with title and image like as carbon kit

ioshitendra commented 7 years ago

can i change a carbankit heigth ?

ermalkaleci commented 7 years ago

@astrolka see example app

astrolka commented 7 years ago

@ermalkaleci oh sorry, i have just understood that there is just segmentedcontrol :D P.s. In this example i have found nothing about this issue

ioshitendra commented 7 years ago

Hello

@ermalkaleci https://github.com/ermalkaleci How can text+image of CarbonTabSwipeNavigation? i am use image but ui not show proper if any way to use both of them. Thankig You

Regards Hitendra Lariya IOS Developer.

ioshitendra commented 7 years ago

@ermalkaleci Hello i have two question about carbankit segment controll

  1. the first thing is how i show badge bar on carban kit segment
  2. and second thing is how to switch next controller or back controller programatically please reply me .
kristoff2016 commented 7 years ago

Very good job! Thank you very much it is the best lib.

hariios1234 commented 7 years ago

how to swipe the view controllers through programmatically in carbon tab swipe navigation....

Dhawan7 commented 7 years ago

Hi How can I change the swipe direction of carbon kit pagecontroller.

MandalAkash commented 7 years ago

how to set carbon kit navigation segment title text in two line

MandalAkash commented 7 years ago

when i swipe controller carbon navigation title change but when i swipe carbon navigation but my controller not changed. how can i change my controller class when i swipe carbon navigation

thechaudharysab commented 6 years ago

Can I make tabs like this in swift? With selected tab background color is changed and unselected tabs color is changed. If yes then how? Because all I found were setIndicatorColor, setNormalColor and setSelectedColor

screen shot 2017-10-05 at 6 25 05 pm
CavalcanteLeo commented 6 years ago

since nobody gave u the code, here it is:

    self.carbonTabSwipeNavigation.toolbar.barTintColor = [UIColor greenColor];
    self.carbonTabSwipeNavigation.toolbar.translucent = NO;
thechaudharysab commented 6 years ago

@CavalcanteLeo Thank you for your answer and this successfully changed the background color but can I change the color of selected tab? Like in the image I've attached the selected tabs is white in color and the unselected are light blue?

chiragpurohit71085 commented 6 years ago

Hi @thechaudharysab

did you resolve this? I need to do same thing as you have asked.

chiragpurohit71085 commented 6 years ago

Hi

If anybody is looking for as asked by @thechaudharysab , here is the solution (with text only)

CarbonTabSwipeSegmentedControl.m

Create custom function

-(void)syncSegmentBgColor { for (UIView *segment in self.segments) {

    if ([self.segments indexOfObject:segment] == self.selectedSegmentIndex) {

         segment.backgroundColor = [UIColor colorWithRed:102.0/255.0f green:124.0/255.0f blue:189.0/255.0f alpha:1];

    } else {

         segment.backgroundColor = [UIColor whiteColor];

    }}}

Call it from setSelectedSegmentIndex e.g

-(void)setSelectedSegmentIndex:(NSInteger)selectedSegmentIndex { [super setSelectedSegmentIndex:selectedSegmentIndex]; [self syncSegmentBgColor]; }

ManojSMac commented 5 years ago

screen shot 2018-12-11 at 2 11 51 pm

Is it possible to show both icon and name as Items heading

ManojSMac commented 5 years ago

If possible kindly share the code

saritbahuguna1 commented 5 years ago

Dear @ermalkaleci ,

Hope you are doing well.

I am getting an issue only in iPad,I have CarbonTabSwipeNavigation with two tabs. in iPhone it is working fine . but in case of iPad I have issue regarding navigation i.e in status bar and CarbonTabSwipeNavigation have some black screen. I do'nt know how it will fix. Can you help me for the same , if have any idea. Simulator Screen Shot - iPad Air 2 - 2019-07-19 at 19 10 25

Waiting for your positive feedback.

milan-mgu commented 4 years ago

Can I make tabs like this in swift? With selected tab background color is changed and unselected tabs color is changed. If yes then how? Because all I found were setIndicatorColor, setNormalColor and setSelectedColor

screen shot 2017-10-05 at 6 25 05 pm

Did you get solution for this ? I want to do same thing.