Ios UIPopoverController的颜色不是这样的

Ios UIPopoverController的颜色不是这样的,ios,objective-c,uitableview,uipopovercontroller,Ios,Objective C,Uitableview,Uipopovercontroller,有人知道为什么会出现白色部分吗?我的视图已经是灰色的,但是有两块白色的 白色:箭头和最后的Popover [更新] 这是调用popover并使箭头指向单击的按钮的代码 - (void) buttonFilter { if (viewFilter == @"Artistas") { content = [self.storyboard instantiateViewControllerWithIdentifier:@"TipoArtistaViewController"

有人知道为什么会出现白色部分吗?我的视图已经是灰色的,但是有两块白色的

白色:箭头和最后的Popover

[更新]

这是调用popover并使箭头指向单击的按钮的代码

- (void) buttonFilter {

    if (viewFilter == @"Artistas") {
        content = [self.storyboard instantiateViewControllerWithIdentifier:@"TipoArtistaViewController"]; // MUDAR PARA O NOVO FILTRO DE ARTISTAS
    } else if (viewFilter == @"Músicas") {
        content = [self.storyboard instantiateViewControllerWithIdentifier:@"CategoriaViewController"];
    }

    [self callFilter:btnFilter Filter:content];
}

- (void)callFilter:(id)sender Filter:(UIViewController *) content{
    self.currentPop = popoverController;

    popoverController = [[WYPopoverController alloc] initWithContentViewController:content];

    UIButton * bt = (UIButton * )sender;
    UIView *view = [bt valueForKey:@"view"];
    popoverController.popoverContentSize = CGSizeMake(320, 180);
    popoverController.delegate = self;
    [popoverController presentPopoverFromRect:view.bounds inView:view permittedArrowDirections:WYPopoverArrowDirectionAny animated:YES];
 }
下一步是装载会话的位置:

//extend and collpase
- (void)setupViewController {

    categoriaBD = [categoriaDAO selectCategoria];


    self.data = [[NSMutableArray alloc] init];
    for (int i = 0; i < [categoriaBD count]; i++)
    {
        NSMutableDictionary * teste = [categoriaBD objectForKey:[NSString stringWithFormat:@"%i", i]];
        ID = [[teste objectForKey:@"1"] integerValue];
        subcategoriaBD = [categoriaDAO selectSubCategoriaByCategoriaID:ID];

        NSMutableArray* section = [[NSMutableArray alloc] init];
        for (int j = 0; j < [subcategoriaBD count]; j++)
        {
            NSMutableDictionary * subCat = [subcategoriaBD objectForKey:[NSString stringWithFormat:@"%i", j]];
            [section addObject:[NSString stringWithFormat:[subCat objectForKey:@"1"]]];
        }
        [self.data addObject:section];                      
    }

    self.headers = [[NSMutableArray alloc] init];
    for (int i = 0; i < [categoriaBD count]; i++)
    {

        NSString *inStr = [NSString stringWithFormat: @"%i", (int)i];
        nomeCategoria = [categoriaBD objectForKey:inStr];

        UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(5, 5, 310, 40)];
        [label setText:[nomeCategoria objectForKey:@"2"]];

        UIView* header = [[UIView alloc] init];

        [header setBackgroundColor:[UIColor colorWithRed:(226/255.0) green:(226/255.0) blue:(226/255.0) alpha:1]];
        [header addSubview:label];
        [self.headers addObject:header];

    }
}
//扩展和collpase
-(无效)设置视图控制器{
categoriaabd=[categoriaado selectCategoria];
self.data=[[NSMutableArray alloc]init];
对于(int i=0;i<[categoriaBD count];i++)
{
NSMutableDictionary*teste=[Category Abd objectForKey:[NSString stringWithFormat:@“%i”,i]];
ID=[[teste objectForKey:@“1”]integerValue];
subcategoriaBD=[categoriaado selectSubCategoriaByCategoriaID:ID];
NSMUTABLEARRY*节=[[NSMUTABLEARRY alloc]init];
对于(int j=0;j<[subcategoriaBD count];j++)
{
NSMutableDictionary*subCat=[subcategoriaBD objectForKey:[NSString stringWithFormat:@“%i”,j]];
[section addObject:[NSString stringWithFormat:[subCat objectForKey:@“1”]];
}
[self.data addObject:section];
}
self.headers=[[NSMutableArray alloc]init];
对于(int i=0;i<[categoriaBD count];i++)
{
NSString*inStr=[NSString stringWithFormat:@“%i”,(int)i];
nomeCategoria=[categoriaBD objectForKey:inStr];
UILabel*label=[[UILabel alloc]initWithFrame:CGRectMake(5,5,310,40)];
[label setText:[nomeCategoria objectForKey:@“2”];
UIView*头=[[UIView alloc]init];
[header setBackgroundColor:[UIColor颜色与红色:(226/255.0)绿色:(226/255.0)蓝色:(226/255.0)alpha:1];
[标题添加子视图:标签];
[self.headers addObject:header];
}
}

您可以创建自定义子类来设置所需箭头的属性

popoverController.popoverBackgroundViewClass = [MyPopoverBackgroundView class];

您可以创建自定义子类来设置所需箭头的属性

popoverController.popoverBackgroundViewClass = [MyPopoverBackgroundView class];

请提及更多关于designpart的细节。比如,你正在使用autolayout或autoresize,或者如何配置popovercontroller等,否则没有人能在这么小的描述中帮助你。你能展示你正在使用的代码吗?是的,当然。我将更新后请提及更多关于designpart的细节。比如,你正在使用autolayout或autoresize,或者如何配置popovercontroller等,否则没有人能在这么小的描述中帮助你。你能展示你正在使用的代码吗?是的,当然。我会更新帖子