小编Ala*_*lan的帖子

iPhone iOS 4.0相机FigCreateCGImageFromJPEG返回-1

自从我更新到4.0,当我使用UIImagePickerController与我的应用程序拍照时,我得到以下错误输出:

***错误:FigCreateCGImageFromJPEG返回-1.输入(null)是711733字节.

我仍然得到返回的图像并且可以正常继续,但是任何身体都知道我得到这个错误的原因和原因.我还得到以下可能相关的警告:

使用两阶段旋转动画.要使用更平滑的单阶段动画,此>应用程序必须删除两阶段方法实现.

旋转多个视图>控制器或视图控制器而不是窗口委托时,不支持使用两阶段旋转动画

任何信息都会有很大帮助.提前致谢.

iphone camera ios4

14
推荐指数
1
解决办法
5098
查看次数

iOS 9 UITableView单元格的文本标签不是UITableView的全宽

自更新到iOS 9以来,iPad横向中的表格视图单元格不再在单元测试中拉伸表格的整个宽度.

我的测试是一个简单的表,最后拍摄快照.

- (void)testTableSize{
    UIViewController *viewController = [[UIViewController alloc] init];
    UITableView *tableView = [[UITableView alloc]initWithFrame:CGRectMake(0,0,viewController.view.bounds.size.width, viewController.view.bounds.size.height) style:UITableViewStylePlain];

    tableView.dataSource = self;
    tableView.delegate = self;

    [tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"Cell"];
    [viewController.view addSubview:tableView];

    ASCSnapshotVerifyViewiPad([viewController view]);
}
Run Code Online (Sandbox Code Playgroud)

对于这个例子,单元格非常简单

static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];

// Configure the cell...
cell.textLabel.backgroundColor = [UIColor blueColor];   // Demo purpose
cell.textLabel.backgroundColor = [UIColor yellowColor]; // Demo purpose
cell.textLabel.text = [NSString stringWithFormat:@"Cell %d", (int)indexPath.row];
return cell;
Run Code Online (Sandbox Code Playgroud)

但是我的细胞在左右两侧画得很大.知道为什么吗?

在此输入图像描述

objective-c uitableview ios

14
推荐指数
1
解决办法
3533
查看次数

将一个UIButtons数组添加到navigationItem.rightBarButtonItem会导致NSInvalidArgumentException

我试图在导航栏的右侧添加一个2个按钮的数组,但是当我运行代码时出现异常.

'NSInvalidArgumentException',原因:' - [UIButton isSystemItem]:发送到实例的无法识别的选择器

我的代码非常简单:

   UILabel * label = [[UILabel alloc] initWithFrame:CGRectMake(0,0,100,45)];
   label.backgroundColor=[UIColor clearColor];
   label.text = @"Test 2 Buttons";

   UIButton *button1 = [UIButton buttonWithType:UIButtonTypeCustom];
   button1.frame = CGRectMake(00.0f, 0.0f, 32.0f, 32.0f);

   UIButton *button2 = [UIButton buttonWithType:UIButtonTypeCustom];
   button2.frame = CGRectMake(00.0f, 0.0f, 32.0f, 32.0f);

   NSArray *rightBarButtons = [[NSArray alloc] initWithObjects:button2, button1, nil];


   UINavigationItem* navItem = self.navigationItem;
   navItem.titleView = label;
   navItem.rightBarButtonItems = rightBarButtons;
   [rightBarButtons release];
   [label release];
Run Code Online (Sandbox Code Playgroud)

我在iPhone 5.0模拟器上运行它.任何的想法??提前致谢.人

iphone xcode cocoa-touch

13
推荐指数
2
解决办法
6306
查看次数

XCode 5.0模糊布局警告

在我的故事板中,我警告模糊的布局.当我点击Xcode的问题导航器中的警告时,Xcode打开故事板,但我不知道我应该在哪里修复模糊的布局.有谁知道如何清楚地指出问题所在?谢谢Al

xcode cocoa uistoryboard xcode5

9
推荐指数
1
解决办法
2158
查看次数