Ich aktualisierte iOS 6.0 SDK mit XCode 4.5.1, und ich hatte ungültige Kontext Fehler 0x0 beim Bearbeiten von UITextField mit Multi-Byte-Tastatur (z. japanisches keybord) in meiner Anwendung. Hier finden Sie Fehler:'ungültiger Kontext Fehler 0x0', beim Bearbeiten von uitextfield mit Multi-Byte-Tastatur mit 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
Ich habe versucht, neues Projekt zu erstellen, und ich diese Fehler hatte. Hier finden Sie neue Projektcode:
- (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;
}
, wenn Sie mit US-Tastatur bearbeiten, werden Sie keine Fehler haben. Wissen Sie, wie Sie dieses Problem vermeiden können?
Danke, ich habe es. – terut