Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8642585
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T11:48:49+00:00 2026-06-12T11:48:49+00:00

How can I create a custom UIActivity in iOS? The reason I want this

  • 0

How can I create a custom UIActivity in iOS?

The reason I want this is to add a Review App button in one of my apps that takes the user to the review section in the App Store. How can I create such a custom UIActivity?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T11:48:50+00:00Added an answer on June 12, 2026 at 11:48 am

    First, create the files. I chose to name mine ActivityViewCustomActivity

    Make ActivityViewCustomActivity.h look like this:

    #import <UIKit/UIKit.h>
    
    @interface ActivityViewCustomActivity : UIActivity
    
    @end
    

    Make ActivityViewCustomActivity.m look like this:

    #import "ActivityViewCustomActivity.h"
    
    @implementation ActivityViewCustomActivity
    
    - (NSString *)activityType
    {
        return @"yourappname.Review.App";
    }
    
    - (NSString *)activityTitle
    {
        return @"Review App";
    }
    
    - (UIImage *)activityImage
    {  
        // Note: These images need to have a transparent background and I recommend these sizes:
        // iPadShare@2x should be 126 px, iPadShare should be 53 px, iPhoneShare@2x should be 100 
        // px, and iPhoneShare should be 50 px. I found these sizes to work for what I was making.
    
        if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
        {
            return [UIImage imageNamed:@"iPadShare.png"];
        }
        else
        {
            return [UIImage imageNamed:@"iPhoneShare.png"];
        }
    }
    
    - (BOOL)canPerformWithActivityItems:(NSArray *)activityItems
    {
        NSLog(@"%s", __FUNCTION__);
        return YES;
    }
    
    - (void)prepareWithActivityItems:(NSArray *)activityItems
    {
        NSLog(@"%s",__FUNCTION__);
    }
    
    - (UIViewController *)activityViewController
    {
        NSLog(@"%s",__FUNCTION__);
        return nil;
    }
    
    - (void)performActivity
    {   
        // This is where you can do anything you want, and is the whole reason for creating a custom 
        // UIActivity
    
        [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=yourappid"]];
        [self activityDidFinish:YES];
    }
    
    @end
    

    This is what my image looked like:
    Here is the .PSD I made: — malicious link removed —
    And here is the original 250 px .png https://i.stack.imgur.com/PAbIM.png

    Now in your view controller do this:

    #import "ActivityViewCustomActivity.h"
    

    And now wherever you want to display your UIActivityViewController:

       NSString *textItem = @"Check out the yourAppNameHere app: itunes http link to your app here";
       UIImage *imageToShare = [UIImage imageNamed:@"anyImage.png"];
    
       NSArray *items = [NSArray arrayWithObjects:textItem,imageToShare,nil];
    
       ActivityViewCustomActivity *aVCA = [[ActivityViewCustomActivity alloc]init];
    
       UIActivityViewController *activityVC =
       [[UIActivityViewController alloc] initWithActivityItems:items
                                                      applicationActivities:[NSArray arrayWithObject:aVCA]];
    
       activityVC.excludedActivityTypes = @[UIActivityTypePostToWeibo, UIActivityTypeAssignToContact, UIActivityTypePrint, UIActivityTypeCopyToPasteboard, UIActivityTypeSaveToCameraRoll];
    
       activityVC.completionHandler = ^(NSString *activityType, BOOL completed)
       {
            NSLog(@"ActivityType: %@", activityType);
            NSLog(@"Completed: %i", completed);
       };
    
       if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
       {
          self.popoverController = [[UIPopoverController alloc] initWithContentViewController:activityVC];
    
          CGRect rect = [[UIScreen mainScreen] bounds];
    
          [self.popoverController
                         presentPopoverFromRect:rect inView:self.view
                         permittedArrowDirections:0
                         animated:YES];
       }
       else
       {
           [self presentViewController:activityVC animated:YES completion:nil];
       }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I create a custom popup tab bar. that has a small button
I have a web app where people can create custom content on the web
I am learning PyQt and wonder if one can create custom/owner draw control like
In Drupal you can create your own nodetype in a custom module. Doing this
I have create a custom contextMenu using AS3 and can apply that to the
I have seen that in Cocoa I can create a custom view using drawing
I like that in javascript, I can create a function, and then add further
I want to know how can i create a custom UITableViewCell with three parts
I want to know how can I create custom widgets/controls in Cocoa. Not a
How I can create custom file template in VS2010? I mean when I add

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.