2

sqlite DBに特定のデータがある場合にのみ初期画面を起動するiPadアプリに取り組んでいます。たとえば、次のようになります。

if ((int)[MyStore sharedInstance].mode < 0) 
{
    self.connectionSettingsViewController = [[[ConnectionSettingsViewController alloc] initWithNibName:@"ConnectionSettingsModalViewController" bundle:nil] autorelease];
    self.connectionSettingsViewController.view.transform = CGAffineTransformMakeRotation(M_PI_2); 
    self.connectionSettingsViewController.delegate = self;
    self.launchScreen = [[[UIView alloc] initWithFrame:CGRectMake(-256, 0, 1024, 768)] autorelease];
    [self.launchScreen addSubview:self.connectionSettingsViewController.view];
    [self.window addSubview:self.launchScreen];
}

そのコードはアプリデリゲートにあります。私が直面している問題は、これがiOS Simulatorで正常に機能することですが、iPadで実行しようとすると、次のエラーが発生します。

[someViewController copyWithZone:] unrecognized selector sent to instance.
4

1 に答える 1

-1

UIViewController は NSCopying プロトコルを実装していません。独自の UIViewController サブクラスに NSCopying を実装していない限り、View Controller は に応答しません-copyWithZone:

于 2011-12-16T21:09:20.953 に答える