0

我最近升级到 iOS 6 Beta 并且遇到了一些问题。(我知道这是一个测试版,但我还不相信它实际上与 iOS 6 相关。)

该问题具有以下参数:

  1. 自定义UITableViewCell生成UIButton对象UIPopOver的对象,从被点击的框架呈现UIButton
  2. 显示UIPopOver,然后 iPad 被旋转。
  3. 当旋转UIPopOver动画完成然后重新显示UIPopOver.

相关信息:

  1. 第一次旋转进行得很好;被UIPopOver解散并正确重新显示。
  2. 第二次轮换(每次)会破坏应用程序。
  3. 我有一个符号断点集,但我没有得到任何有用的信息。
  4. 我对UIPopOver从. 我对这些过渡没有任何问题。UIBarButtonUIToolbar
  5. 这是一个新问题,与很长时间没有更改的代码有关。
  6. 我收到的错误是:“警告:尝试使用不在框架中的块创建 USE_BLOCK_IN_FRAME 变量。”

这是与旋转相关的执行代码:

- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation {
    if ([self PopOver]) {
        [[self PopOver] dismissPopoverAnimated:YES];
        [self setPopOver:nil];
        [self ButtonPressed:[self TouchedCell]];
    }
    [[self TableView1] reloadData];
    [[self TableView2] reloadData];
}

- (void)ButtonPressed:(Cell *)cell {
    [self setTouchedCell:cell];
    NSString *nibName = @"View";
    if (UI_USER_INTERFACE_IDIOM()==UIUserInterfaceIdiomPad) {
        nibName = @"View-iPad";
    }

    ViewController *vc = [[ViewController alloc] initWithNibName:nibName
                                                          bundle:nil];
    if (UI_USER_INTERFACE_IDIOM()==UIUserInterfaceIdiomPad) {
        UIPopoverController *popOver = [[UIPopoverController alloc]
            initWithContentViewController:vc];
        [self setPopOver:popOver];
        [popOver setDelegate:self];
        [[self PopOver] setPopoverContentSize:CGSizeMake(320, 320)];
        [popOver presentPopoverFromRect:[[cell CheckButton] frame] 
                                 inView:[cell contentView]
               permittedArrowDirections:UIPopoverArrowDirectionAny 
                               animated:YES];
    } else {
        // iPhone doesn't use PopOvers...
    }
}

有人知道我接下来应该做什么吗?

4

1 回答 1

1

这是我的官方回答 - 我认为您的弹出框正试图在屏幕外显示,或者可能来自已经回收的单元格。;)

于 2012-07-02T18:52:43.500 回答