Ipad 如何使popover视图自动关闭并为嵌套的UITableView设置背景图像
我对popover的观点有两个问题: 我使用popoverController显示带有NavigationController的UIViewController,在该viewController中,NavigationController上包含2个UITableView、Cancel和Done按钮 1-当我尝试设置背景颜色或背景图像时(通过[UIColor WithPatternImage:[UIImage ImageName:@“ViewBg.png”]];),但对tableView和viewController.view都没有效果。背景色仍为默认颜色 2-我想在点击“取消”或“完成”按钮时关闭popView,我试图将popoverController传递给嵌套的viewController,然后调用dismissPopoverAnimated:但不是运气 有人知道怎么做吗?请帮帮我! 提前谢谢 1) 我猜您是在UIViewController上将colorWithPatternImage设置为BG,而不是在TableView上。 您可以试试Ipad 如何使popover视图自动关闭并为嵌套的UITableView设置背景图像,ipad,background,uipopovercontroller,dismiss,Ipad,Background,Uipopovercontroller,Dismiss,我对popover的观点有两个问题: 我使用popoverController显示带有NavigationController的UIViewController,在该viewController中,NavigationController上包含2个UITableView、Cancel和Done按钮 1-当我尝试设置背景颜色或背景图像时(通过[UIColor WithPatternImage:[UIImage ImageName:@“ViewBg.png”]];),但对tableView和view
[table setBackgroundColor:[UIColor clearColor]]两个UITablesView上的代码>
(二)
我猜你一定做过类似的事情:
in loadView:
self.navigationItem.leftBarButtonItem=[[UIBarButtonItem alloc]
initWithTitle:@"Back"
style:UIBarButtonItemStylePlain
target:self
action:@selector(dismissPopoverMethod)];
- (void)dismissPopOverMethod
{
[referencedPopOver dismissPopoverAnimated:YES]
}
(一)
我猜您是在UIViewController上将colorWithPatternImage设置为BG,而不是在TableView上。
您可以试试[table setBackgroundColor:[UIColor clearColor]]两个UITablesView上的代码>
(二)
我猜你一定做过类似的事情:
in loadView:
self.navigationItem.leftBarButtonItem=[[UIBarButtonItem alloc]
initWithTitle:@"Back"
style:UIBarButtonItemStylePlain
target:self
action:@selector(dismissPopoverMethod)];
- (void)dismissPopOverMethod
{
[referencedPopOver dismissPopoverAnimated:YES]
}
这正是我所做的,但没有任何效果:(1)你做了[self-setBackgroundColor:[UIColor colorWithPatternImage:[UIImage ImageName:@“ViewBg.png”]];不能添加表视图并检查是否设置了bg吗?然后添加带有clearColor的TableView亲爱的Gopal,我做过的事情:将视图留空,将表格背景设置为clearColor,我无法设置背景颜色或图像,没有效果。这正是我所做的,但没有效果:(1)你做过[self-setBackgroundColor:[UIColor WithPatternImage:[UIImage ImageName:@“ViewBg.png”]];不能添加表视图并检查是否设置了bg吗?然后用clearColor添加TableView亲爱的Gopal,我曾经做过的事情:将视图留空,将table background设置为clearColor,我无法设置我的背景色或图像,没有效果。