我看到这个问题已经存在一段时间了,但似乎没有人提出一个普适的解决方案,包括我自己。我的三个错误如下:
<Error>: CGContextSaveGState: invalid context 0x0. This is a serious error. This application, or a library it uses, is using an invalid context and is thereby contributing to an overall degradation of system stability and reliability. This notice is a courtesy: please fix this problem. It will become a fatal error in an upcoming update.
<Error>: CGContextSetStyle: invalid context 0x0. This is a serious error. This application, or a library it uses, is using an invalid context and is thereby contributing to an overall degradation of system stability and reliability. This notice is a courtesy: please fix this problem. It will become a fatal error in an upcoming update.
<Error>: CGContextRestoreGState: invalid context 0x0. This is a serious error. This application, or a library it uses, is using an invalid context and is thereby contributing to an overall degradation of system stability and reliability. This notice is a courtesy: please fix this problem. It will become a fatal error in an upcoming update.
我的应用程序仍然可以正常运行和工作。但是我想知道是否应该担心这个问题。
顺便说一下,我正在使用Xcode 5.0.1,并且该应用程序设置为iOS 7。导致出现错误的视图控制器上的库如下:
In the .h
#import <UIKit/UIKit.h>
#import "Event.h"
#import <MessageUI/MessageUI.h>
#import <EventKit/EventKit.h>
#import <EventKitUI/EventKitUI.h>
In the .m
#import "EventDetailsViewController.h"
#import "XMLReader.h"
#import <Twitter/Twitter.h>
#import "AppDelegate.h"
#import "FBShareViewController.h"
#import <MapKit/MapKit.h>
谢谢