Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/103.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/three.js/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 将UIView设置为UIAbbar的背景_Ios_Uiview_Background_Uitabbar - Fatal编程技术网

Ios 将UIView设置为UIAbbar的背景

Ios 将UIView设置为UIAbbar的背景,ios,uiview,background,uitabbar,Ios,Uiview,Background,Uitabbar,我知道如何自定义uitabar的背景颜色或背景图像: tabBar.barTintColor = [UIColor ...]; // set background color tabBar.backgroundImage = [UIImage ...]; // set background image 不幸的是,我没有找到任何选项如何将UIView设置为文档中选项卡栏的背景。有没有办法让我做到这一点?你到底想达到什么目的?你想在顶部有一个透明的视图吗?你能告诉我们你到底想做什么吗?它

我知道如何自定义
uitabar
的背景颜色或背景图像:

tabBar.barTintColor = [UIColor ...];     // set background color
tabBar.backgroundImage = [UIImage ...];  // set background image

不幸的是,我没有找到任何选项如何将UIView设置为文档中选项卡栏的背景。有没有办法让我做到这一点?

你到底想达到什么目的?你想在顶部有一个透明的视图吗?你能告诉我们你到底想做什么吗?它将帮助我们…我有一个
UIView
,带有一个自定义的
-drawRect
方法,例如绘制渐变。我想使用该视图作为选项卡栏的背景。如果我能用一个图像“蒙皮”我的标签栏,我不明白为什么似乎没有选择使用简单视图来代替。