小编BrF*_*eek的帖子

在编辑模式下重新排序时更改UITableViewCell的背景颜色

我正在开发一个包含UITableView的应用程序.用户唯一需要的是重新排序UITableView的内容.在编辑模式下,tableview单元格的背景颜色变为透明.在重新排序时,有没有办法保持tableview单元格的原始背景颜色?

解:

经过几次额外搜索后,我找到了(简单)解决方案.通过将cell.backgroundView.backgroundcolor添加到willDisplayCell方法,问题得以解决.

objective-c uitableview ios ios7

4
推荐指数
1
解决办法
2759
查看次数

CGImageCreate:打开控制中心时图像大小无效0 x 0

我正在使用自定义UINavigationBar的选项卡式应用程序.每当我在iOS模拟器中打开控制中心时,Xcode中的命令行都会给我以下错误:

CGImageCreate:无效的图像大小0 x 0.

它出现在每个ViewController中,即使是空的.

这可能与自定义UINavigationBar或TabBar有关吗?

这是我用于标签栏的appdelegate.m文件中的代码

    DMFirstViewController *firstViewController = [[DMFirstViewController alloc] init];
    DMSecViewController *secondViewController = [[DMSecViewController alloc] init];
    DMThirdViewController *thirdViewController = [[DMThirdViewController alloc] init];
    DMFourthViewController *fourthViewController = [[DMFourthViewController alloc] init];

    tabController = [[UITabBarController alloc] init];

    NSArray* controllers = [NSArray arrayWithObjects:firstViewController, secondViewController, thirdViewController, fourthViewController, nil];

    tabController.viewControllers = controllers;


    UIImage *unselectedTabFirst = [UIImage imageNamed:@"first_line.png"];
    UIImage *selectedTabFirst = [UIImage imageNamed:@"first_active.png"];

    UIImage *unselectedTabSec = [UIImage imageNamed:@"second_line.png"];
    UIImage *selectedTabSec = [UIImage imageNamed:@"second_active.png"];

    UIImage *unselectedTabThird = [UIImage imageNamed:@"third_line.png"];
    UIImage *selectedTabThird = [UIImage imageNamed:@"third_active.png"];

    UIImage *unselectedTabFourth …
Run Code Online (Sandbox Code Playgroud)

objective-c uinavigationbar uitabbar ios

2
推荐指数
1
解决办法
5002
查看次数

标签 统计

ios ×2

objective-c ×2

ios7 ×1

uinavigationbar ×1

uitabbar ×1

uitableview ×1