2012-10-09 3 views
8

iOS 6.0 SDKをXCode 4.5.1で更新しました。マルチバイトキーボードでUITextFieldを編集するときに無効なコンテキストエラー0x0が発生しました。 japanese keybord)を使用しています。 次のエラーです:iOS 6.0でマルチバイトキーボードを使用してuitextfieldを編集するとき

Oct 9 21:46:44 example.com Example[2303] <Error>: CGContextSaveGState: invalid context 0x0 
Oct 9 21:46:44 example.com Example[2303] <Error>: CGContextDrawLinearGradient: invalid context 0x0 
Oct 9 21:46:44 example.com Example[2303] <Error>: CGContextSetFillColorWithColor: invalid context 0x0 
Oct 9 21:46:44 example.com Example[2303] <Error>: CGContextFillRects: invalid context 0x0 
Oct 9 21:46:44 example.com Example[2303] <Error>: CGContextFillRects: invalid context 0x0 
Oct 9 21:46:44 example.com Example[2303] <Error>: CGContextSetFillColorWithColor: invalid context 0x0 
Oct 9 21:46:44 example.com Example[2303] <Error>: CGContextFillRects: invalid context 0x0 
Oct 9 21:46:44 example.com Example[2303] <Error>: CGContextSaveGState: invalid context 0x0 
Oct 9 21:46:44 example.com Example[2303] <Error>: CGContextDrawLinearGradient: invalid context 0x0 
Oct 9 21:46:44 example.com Example[2303] <Error>: CGContextSetFillColorWithColor: invalid context 0x0 
Oct 9 21:46:44 example.com Example[2303] <Error>: CGContextFillRects: invalid context 0x0 
Oct 9 21:46:44 example.com Example[2303] <Error>: CGContextFillRects: invalid context 0x0 
Oct 9 21:46:44 example.com Example[2303] <Error>: CGContextSetFillColorWithColor: invalid context 0x0 
Oct 9 21:46:44 example.com Example[2303] <Error>: CGContextFillRects: invalid context 0x0 

私は新しいプロジェクトを作成しようと、私はこれらのエラーを持っていました。 次は、新しいプロジェクトのコードです:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 
{ 
    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; 
    // Override point for customization after application launch. 
    self.window.backgroundColor = [UIColor whiteColor]; 
    [self.window makeKeyAndVisible]; 

    UITextField *foo = [[UITextField alloc] initWithFrame:CGRectMake(30, 30, 200, 50)]; 

    [self.window addSubview:foo]; 

    return YES; 
} 

あなたはUSキーボードで編集する場合、あなたはエラーを持っていません。 この問題を回避する方法を知っていますか?

答えて

1

このエラーは空ですUITextFieldの上でダブルクリックを追跡することが可能です。これはiOSのバグです。テキストフィールドを ""に初期化すると、エラーが消えます。

+0

@G M:私はまったく同じことを見ており、それがダブルクリックに至ったようだと同意するでしょう。しかし、この回答のあなたの参照は何ですか?私たちをリンクすることができるドキュメンテーション/フォーラム投稿はありますか? – sjwarner

+0

私はシミュレータでテキストビューをダブルクリックしようとしたときにもこれを見ました... – rkh

関連する問題