I try to make avtivity view controller. Everything is fine on simulators and iPhone, but on iPad I see this:
Here is my code:
NSArray *activityItems = @[@"Text to share"];
UIActivityViewController *activityController =
[[UIActivityViewController alloc] initWithActivityItems:activityItems
applicationActivities:nil];
NSMutableArray *activityTypes = [NSMutableArray new];
//TODO: handle this array for iOS7 only
[activityTypes addObjectsFromArray:@[UIActivityTypeAddToReadingList,
UIActivityTypePostToFlickr,
UIActivityTypePostToVimeo,
UIActivityTypePostToTencentWeibo,
UIActivityTypeAirDrop]];
activityController.excludedActivityTypes = activityTypes;
//TODO: handle this for both iOS7 and iOS6
[activityTypes addObjectsFromArray:@[UIActivityTypePostToWeibo,
UIActivityTypePrint,
UIActivityTypePrint,
UIActivityTypeAssignToContact,
UIActivityTypeSaveToCameraRoll]];
activityController.excludedActivityTypes = activityTypes;
[self presentViewController:activityController
animated:YES
completion:nil];
It's not iPad version, it's iPhone version which I launch on iPad. But still it should works properly. What am I doing wrong?
UPD: also I have this in logs:
Mar 31 18:25:58 Marias-iPad SharingExample[713] : 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.
Mar 31 18:25:58 Marias-iPad SharingExample[713] : 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.
Mar 31 18:25:58 Marias-iPad SharingExample[713] : 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.
Mar 31 18:25:58 Marias-iPad SharingExample[713] : CGContextSetBlendMode: 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.
Mar 31 18:25:58 Marias-iPad SharingExample[713] : CGContextFillRects: 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.
Mar 31 18:25:58 Marias-iPad SharingExample[713] : CGContextSetBlendMode: 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.