objective c - UIActivityViewController presenting issue iphone -
uiactivityviewcontroller *activityvc = [[uiactivityviewcontroller alloc] initwithactivityitems:@[message] applicationactivities:nil]; activityvc.excludedactivitytypes = nil; [activityvc setcompletionhandler:^(nsstring *activitytype, bool completed) { activityvc.completionhandler = nil; // if (completed) // [utils alertmessage:knslocalizedstring(@"title20_key#0", nil) title:nil delegate:nil cancelbutton:knslocalizedstring(@"ok_key#0", nil) otherbutton:nil hiden:nil]; [activityvc dismissviewcontrolleranimated:yes completion:^{ _issharing = no; }]; }]; if ([self respondstoselector:@selector(popoverpresentationcontroller)]) { activityvc.popoverpresentationcontroller.sourceview = self.view; } [self presentviewcontroller:activityvc animated:yes completion:^{ _issharing = yes; }];
i getting below warning.
warning: attempt present on presenting (null)
check viewcontroller giving self null.
you can check tutorial uiactivityviewcontroller below link
http://www.amaniphoneblog.com/2014/09/uiactivityviewcontroller-ios-tutorial.html
Comments
Post a Comment