Skip to content
This repository has been archived by the owner on Sep 21, 2020. It is now read-only.

Carbon segment control text hides under indicator #237

Open
O-mkar opened this issue Aug 11, 2019 · 2 comments
Open

Carbon segment control text hides under indicator #237

O-mkar opened this issue Aug 11, 2019 · 2 comments

Comments

@O-mkar
Copy link

O-mkar commented Aug 11, 2019

I i have modified indicator height and it seems to work fine but the indicator overlaps the title, looks like a bug

How it looks

27C6F167-12F5-4BC9-BF6C-8EAF282E60EF

But when i over scroll on right it fixes

B39A0712-1E15-47FB-ACCF-5BA3F7201AB6

Here is a video link https://youtu.be/eGCbbcT6ki4

Any idea what willl be the issue?

@O-mkar
Copy link
Author

O-mkar commented Aug 11, 2019

i fixed it by using zPosition, i'm not sure if it is the right way to do it.

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

        for (UIView *subView in segment.subviews) {
            if ([subView isKindOfClass:[UIImageView class]]) {
                if ([self.segments indexOfObject:segment] == self.selectedSegmentIndex) {
                    subView.tintColor = _imageSelectedColor;
                    self.indicator.layer.zPosition = -1; //here

                } else {
                    subView.tintColor = _imageNormalColor;

                }
            }

            
        }

    }
}

@Jony-Ive-1993
Copy link

just add one line in pod file : - CarbonTabSwipeNavigation.m

self.carbonSegmentedControl.indicator.layer.zPosition = -1;

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

No branches or pull requests

2 participants