Tag: uibackgroundcolor

单击UItableviewcell背景颜色

如何设置一个颜色的select或勾选整个单元格,并重置为以前的颜色,而在uitableview未选中?我试过,但它显示了一个sec.can的背景颜色任何人请帮我编码。

UIPageViewController和UIPageControl透明背景颜色 – iOS

我正在做一个教程,当应用程序首次启动,并使用UIPageViewController 。 一切工作正常,但UIPageViewController的背景颜色不透明。 它总是黑色的,如下所示: 这是我如何添加UIPageViewController (在一个UIPageViewController控制器) .h文件: @interface CHMainTabViewController : UITabBarController <UIPageViewControllerDataSource> @property (strong, nonatomic) UIPageViewController *pageViewController; @end .m文件(在viewDidLoad ): // Create page view controller self.pageViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"PageViewController"]; self.pageViewController.dataSource = self; self.pageViewController.view.backgroundColor = [UIColor clearColor]; TutorialViewController *startingViewController = [self viewControllerAtIndex:0]; NSArray *viewControllers = @[startingViewController]; [self.pageViewController setViewControllers:viewControllers direction:UIPageViewControllerNavigationDirectionForward animated:NO completion:nil]; [self presentViewController:_pageViewController animated:YES completion:nil]; 在我的AppDelegate.m中,我还设置了UIPageControl的背景色: […]

只为UIView的一部分设置背景颜色

我想我的UIView底部(不是一半)是一个不同的颜色比顶部。 我想知道如果我应该创build一个CGRect,然后颜色? 这是沿着正确的轨道? – (void)drawRect:(CGRect)rect { CGRect aRect = CGRectMake(x, y, width, height); // Fill the rectangle with grey [[UIColor greyColor] setFill]; UIRectFill( rect ); }

CollectionView背景clearColor不起作用

我正在开发一个小的collectionview“框架”,在iPad上performance得像一个浏览器标签栏(think chrome)。 代码全部完成,自定义stream程布局,重新sorting等等,并按以下方式组织: •TabBarCollectionViewController .h / .m / .xib包含集合视图的高逻辑(代表+数据源方法)。 我有xibconfigurationcollectionView设置,并设置自定义stream布局(我可以这样做编程,但哦,这很容易)。 CustomFlowLayout .h / .m(stream布局的子类) •TabBarCell.h / .m / .xib(collectionviewcell的子类) 然后我添加TabBarCVC作为一个childViewController在我的主视图控制器(这个viewController有很多childViewController和子视图),然后作为子视图。 在这一点上,所有的工作fiiiiine。 现在的问题,这是如此愚蠢,我不能相信我还没有find一种方法来做到这一点, collectionView的backgroundColor不能设置为clearColor 。 我可以把它放在灰色或任何颜色,但它不支持透明度。 单元格的背景颜色也很清晰并且可以工作。 我需要collectionView透明来显示背后的主视图的纹理。 任何有识之士都会非常感激,或者我会把我的第一个雷达填充到苹果。 如果我找不到任何解决scheme,我只需添加应该在collectionView后面的纹理“截图”,并将其添加为collectionView的backgroundView中的imageView。

UITableView backgroundColor在iPad上始终为白色

我正在做一个项目。 我有很多UITableView被设置为清晰的颜色。 他们的意见的背景颜色设置为我的自定义颜色,一切都很好,在iPhone上 。 这个问题出现在iPad上 ! 我尝试了几乎所有的东西,但我的UITableView有一个白色的颜色。 我检查了其他主题,例如: UITableView backgroundColor在iPad上总是灰色 ,但没有任何工作。 另外,我的问题不是灰色的,它像雪一样白。 可能是什么原因呢?