ermalkaleci / CarbonKit

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

Change CarbonKit SegmentControll Color Like Clear or Transparent #166

Open RB-King opened 7 years ago

RB-King commented 7 years ago

Hello,

I want to set the like clear color or transparent segment view. Like, here i attached my images.i want to set as per my last image and i want to remove white color.

I try with this code and more other way,

carbonTabSwipeNavigation.toolbar.translucent = NO; carbonTabSwipeNavigation.carbonSegmentedControl.tintColor = [UIColor clearColor];

But not set, So Please guide me and help screen shot 2017-06-20 at 4 47 46 pm screen shot 2017-06-20 at 4 48 26 pm

@ermalkaleci

VivekVithlani commented 6 years ago

Try this code

carbonTabSwipeNavigation.toolbar.translucent = true; [carbonTabSwipeNavigation.toolbar setBackgroundImage:[UIImage new] forToolbarPosition:UIToolbarPositionAny barMetrics:UIBarMetricsDefault]; Tested for me.

Md-Rais commented 5 years ago

Hi Vivek, The above code doesn't work. For me the toolbar background color becomes white but not clear. Any help?

Md-Rais commented 5 years ago

Hi Ermal Kaleci,

Any help by updating carbon kit with this feature?

Esam-Elayyan commented 4 years ago

CarbonTabSwipeNavigation().toolbar.setBackgroundImage(UIImage(),forToolbarPosition: .any, barMetrics: .default) CarbonTabSwipeNavigation().toolbar.setShadowImage(UIImage(), forToolbarPosition: .any)

ajinkya92 commented 4 years ago

carbonTabSwipeNavigation.toolbar.barTintColor = UIColor.groupTableViewBackground