NAXAM / toptabbedpage-xamarin-forms

TopTabbedPage - A Xamarin.Forms page for showing tabs at top on iOS
Apache License 2.0
81 stars 24 forks source link

Troubles with colors on iOS 13.1.3 and Xamarin.iOS 13.2 #38

Closed AlexeyBuryanov closed 4 years ago

AlexeyBuryanov commented 5 years ago

For example

With old SDK (it's okay): normal

With new SDK, white theme: white

With new SDK, dark theme: black

Pay attention to the colors. Especially on the background of the tabs.

Version 0.0.3.8-pre didn't fix it.

Thanks

thanhnam1042 commented 5 years ago

I have the same problem. Please fix it.

AlexeyBuryanov commented 5 years ago

It seems that problem at the level native MaterialControls library. https://github.com/fpt-software/Material-Controls-For-iOS/issues/181

tuyen-vuduc commented 4 years ago

Please check out latest pre version, guys.

shubhankarbhavsar commented 4 years ago

Please try this fix.

(void)initContent { self.horizontalInset = 0;

segmentedControl = [[MDSegmentedControl alloc] initWithTabBar:self]; [segmentedControl setTintColor:[UIColor clearColor]]; /// Tint color doesn't have any effect on iOS 13. if (@available(iOS 13.0, *)) { [segmentedControl setTitleTextAttributes:@{NSForegroundColorAttributeName: [UIColor whiteColor], NSFontAttributeName: [UIFont systemFontOfSize:13]} forState:UIControlStateSelected]; [segmentedControl setSelectedSegmentTintColor:[UIColor clearColor]]; [segmentedControl setBackgroundColor:[UIColor clearColor]]; segmentedControl.layer.cornerRadius = 0.0; } else { [segmentedControl setTintColor:[UIColor clearColor]]; } scrollView = [[UIScrollView alloc] init]; [scrollView setShowsHorizontalScrollIndicator:NO]; [scrollView setShowsVerticalScrollIndicator:NO]; scrollView.bounces = NO;

[scrollView addSubview:segmentedControl];

[self addSubview:scrollView];

self.horizontalPaddingPerItem = (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) ? 20: 15; segmentedControl.horizontalPadding = self.horizontalPaddingPerItem;

[self setBackgroundColor:[UIColorHelper colorWithRGBA:kMDColorPrimary500]]; self.layer.shadowColor = [UIColor blackColor].CGColor; self.layer.shadowRadius = 1; self.layer.shadowOpacity = .5; self.layer.shadowOffset = CGSizeMake(0, 1.5);

[self setTextColor:[UIColor whiteColor]]; [self setIndicatorColor:[UIColor whiteColor]]; [self setRippleColor:[UIColor whiteColor]]; }