Павло Бойко Павло Бойко - 3 months ago 35
Objective-C Question

Bottom share menu iOS [Obj-c]

How create bottom share menu in my application line this one screen, it should simle view with buttons and collection view or external framework?

Answer

 

      NSArray * activityItems = @[@"",[NSURL URLWithString:@"http://www.google.com"]];
      NSArray * applicationActivities = nil;
      NSArray * excludeActivities = @[UIActivityTypePostToFacebook,UIActivityTypePostToTwitter,UIActivityTypeMail, UIActivityTypeMessage, UIActivityTypePrint, UIActivityTypeAirDrop];
      UIActivityViewController * activityController = [[UIActivityViewController alloc] initWithActivityItems:activityItems applicationActivities:applicationActivities];
      activityController.excludedActivityTypes = excludeActivities;

     [self presentViewController:activityController animated:YES completion:nil];