从UITabBar中删除灰色渐变

时间:2015-10-31 18:46:47

标签: swift storyboard uitabbarcontroller uitabbar

这是我第一次使用UITabBar,而我在查看我想要的样子方面遇到了问题。

现在它仍然有一些灰色阴影覆盖它。我似乎无法删除这个!

我已将此行添加到我的代码中,但阴影仍然显示:

    self.universalTabBar.setValue(true, forKey: "_hidesShadow");

谁能告诉我自己做错了什么?

enter image description here

1 个答案:

答案 0 :(得分:1)

尝试设置每个标签栏项目图像的渲染模式。

#include <stdio.h>
#include <stdlib.h>

int main (void) {

    char *word = NULL;

    word = malloc (10 * sizeof *word);
    if (!word) {  /* always validate each allocation */
        fprintf (stderr, "error: virtual memory exhausted.\n");
        return 1;
    }

    printf ("\nEnter up to 9 characters to store in 'word': ");
    if (scanf ("%9[^\n]%*c", word))
        printf ("word contains '%s'\n", word);

    free (word);

    return 0;
}