UIPickerView 与 navigationBar 颜色相同
UIPickerView to be same color as navigationBar
我有一个带有 UIPickerView 的应用程序,需要时它会出现在屏幕上。我希望它与默认的导航栏颜色相同,有点透明,你可以透过它看到但不足以掩盖导航栏上的内容。
可能有一个简单的解决方案,如果有就太好了!我是游戏新手。
提前致谢
感谢@ChristianSchorr 我使用 UIVisualEffectView 来实现我的目标
UIVisualEffectView *visualEffectView;
UIVisualEffect *blurEffect;
blurEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleLight];
visualEffectView = [[UIVisualEffectView alloc] initWithEffect:blurEffect];
[self.tableStations addSubview:visualEffectView];
pickerSort.frame = CGRectMake(0,0,originalPickerFrame.size.width,originalPickerFrame.size.height);
visualEffectView.frame = CGRectMake(0,0,originalPickerFrame.size.width,originalPickerFrame.size.height - 64);
为我所需要的工作
我有一个带有 UIPickerView 的应用程序,需要时它会出现在屏幕上。我希望它与默认的导航栏颜色相同,有点透明,你可以透过它看到但不足以掩盖导航栏上的内容。
可能有一个简单的解决方案,如果有就太好了!我是游戏新手。
提前致谢
感谢@ChristianSchorr 我使用 UIVisualEffectView 来实现我的目标
UIVisualEffectView *visualEffectView;
UIVisualEffect *blurEffect;
blurEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleLight];
visualEffectView = [[UIVisualEffectView alloc] initWithEffect:blurEffect];
[self.tableStations addSubview:visualEffectView];
pickerSort.frame = CGRectMake(0,0,originalPickerFrame.size.width,originalPickerFrame.size.height);
visualEffectView.frame = CGRectMake(0,0,originalPickerFrame.size.width,originalPickerFrame.size.height - 64);
为我所需要的工作