Actualicé iOS 6.0 SDK con XCode 4.5.1, y tuve un error de contexto no válido 0x0 al editar UITextField con teclado de varios bytes (p. japanese keybord) en mi aplicación. El siguiente es el error:'error de contexto no válido 0x0', al editar uitextfield usando teclado de varios bytes con iOS 6.0
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
Intenté crear nuevo proyecto y tuve estos errores. El siguiente es nuevo código de proyecto:
- (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;
}
si edita con el teclado de Estados Unidos, que no tendrá errores. ¿Sabes cómo evitar este problema?
Gracias, lo tengo. – terut