objective c - iOS share button crashing when run on ipad -
i working on xcode project in objective-c , want share button on ios application share things watched tutorial on youtube here's link : https://www.youtube.com/watch?v=zkrokn_oa_a when run code on iphone works , when run code on ipad xcode give's me error :
int main(int argc, char * argv[]) { @autoreleasepool { return uiapplicationmain(argc, argv, nil, nsstringfromclass([appdelegate class])); }} i used code :
- (ibaction)share1:(id)sender { uiimage *shareimage = [uiimage imagenamed:@"invoice_logo.png"]; nsarray *itemstoshare = @[shareimage]; uiactivityviewcontroller *activityvc = [[uiactivityviewcontroller alloc] initwithactivityitems:itemstoshare applicationactivities:nil]; activityvc.excludedactivitytypes = @[]; [self presentviewcontroller:activityvc animated:yes completion:nil];}
you missing :
activityvc.excludedactivitytypes=@[uiactivitytypeposttofacebook,uiactivitytypeposttotwitter]// add share types look @ video provided 7:30 min
Comments
Post a Comment