2017-12-13 4 views

Antwort

0

fand ich eine universelle Lösung iOS Version

Objective-C

BOOL isFound = NO; 
for (UIView *view in self.tabBar.subviews) { 
    for (UIView *v in view.subviews) { 
     if (v.frame.size.height < 2.0f) { 
      v.hidden = YES; 
      isFound = YES; 
      break; 
     } 
    } 
    if (isFound) { 
     break; 
    } 
} 
0

versuchen, dies seine kann hilfreich sein, zu ignorieren.

-> Für Objective C

1. [[UITabBar appearance] setBackgroundImage:[[UIImage alloc] init]]; 
2. [[UITabBar appearance] setShadowImage:[[UIImage alloc] init]]; 
3. [[UITabBar appearance] setValue:@(YES) forKeyPath:@"_hidesShadow"]; 
4. [[UITabBar appearance] setShadowImage: nil]; 

-> Für Swift

1. UITabBar.appearance().shadowImage = UIImage() 
2. UITabBar.appearance().backgroundImage = UIImage() 
3. UITabBar.setValue(true, forKey: "_hidesShadow") 
4. UITabBar.appearance().shadowImage = nil 
+0

iOS 11, funktioniert es nicht – swifterfit

Verwandte Themen