hackiftekhar / IQActionSheetPickerView

ActionSheet with UIPickerView
MIT License
205 stars 76 forks source link

invalid context 0x0 under iOS 7.0 and system degradation #2

Closed spraveenk91 closed 10 years ago

spraveenk91 commented 10 years ago

Hello Iftekhar,

I have integrated your IQActionSheetPickerView in my application. Its working fine. But, when i tried to run the application in iOS7 i faced following warning in my log trace,

: CGContextSetFillColorWithColor: 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.

: CGContextSetStrokeColorWithColor: 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.

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.

: CGContextSetFlatness: 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.

: CGContextAddPath: 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.

: CGContextDrawPath: 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.

: 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.

: CGContextGetBlendMode: 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.

I checked your code too. You've not using drawRect method or any CGContext method. But, can't able to find why this warning raising. Facing only on iOS7

Awaiting for your reply.

osrl commented 10 years ago

Did you use initWithFrame method?

hackiftekhar commented 10 years ago

May be @spraveenk is using other method than IQActionSheetPickerView *picker = [[IQActionSheetPickerView alloc] initWithTitle:@"Single Picker" delegate:self cancelButtonTitle:nil destructiveButtonTitle:nil otherButtonTitles:nil, nil];

It is working fine in Sample Project.

Thanks Iftekhar

brycedev commented 10 years ago

@spraveenk

you may be getting these issues if you haven't imported QuartzCore

spraveenk91 commented 10 years ago

@osrl No. Actually, i have followed the same as per github example.

spraveenk91 commented 10 years ago

@hackiftekhar Yes, working only with sample project.

zltqzj commented 10 years ago

hello: can you tell me how to set default row in a componet? such as set the fifth row in the second componet after init. I try a lot ,but failed.

hackiftekhar commented 10 years ago

@zltqzj

Try selectedTitles property for selecting rows in component.

@property(nonatomic, strong) NSArray *selectedTitles;

You should pass NSArray of NSString to select values in pickerView. Suppose there are 3 rows in pickerView then you should pass NSArray of 3 NSString to select respective rows on pickerView.

RonSkons commented 10 years ago

i also got a similar 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.
hackiftekhar commented 10 years ago

Fixed CGContextWarnings. Updated to support iOS 8. Internal architecture updated.