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 9044923
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T11:06:43+00:00 2026-06-16T11:06:43+00:00

Does anyone know how to disable the completion sounds of the SLComposeViewController in iOS?

  • 0

Does anyone know how to disable the completion sounds of the SLComposeViewController in iOS?

The sound is played after the user posted a message to e.g. Facebook or Twitter.

  • 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-16T11:06:45+00:00Added an answer on June 16, 2026 at 11:06 am

    You can do following:

    Make SLComposeViewController not to send tweet when pressed “Send”. And send tweet manually.

    1. Walk through all views recursively and find button “Send”

    // UIButton with width 50px
    - (UIButton *)tweetSendButton:(UIView *)view
    {
        for (UIView * subview in view.subviews)
        {
            if ([subview isKindOfClass:[UIButton class]]
                && subview.bounds.size.width == 50)
            {
                return (UIButton *)subview;
            }
            UIButton * button = [self tweetSendButton:subview];
            if (button) return button;
        }
        return nil;
    }
    
    ...
    UIButton * sendButton = [self tweetSendButton:_tweetController.view];
    

    2. Remove all actions for target SLComposeViewController

    NSArray * actions = [sendButton actionsForTarget:_tweetController forControlEvent:UIControlEventTouchUpInside];
    for (NSString * action in actions)
        [sendButton removeTarget:_tweetController action:NSSelectorFromString(action) forControlEvents:UIControlEventTouchUpInside];
    

    3. Add own action for UIControlEventTouchUpInside event

    [sendButton addTarget:self action:@selector(sendCustomTweet:) forControlEvents:UIControlEventTouchUpInside];
    

    4. When “Send” button was pressed use this methods to get text and account (if necessary):

    ....
    UITextView * textView = [self tweetTextView:self.tweetController.view];
    UIButton * accountButton = [self twitterAccountButton:self.tweetController.view];
    
    NSString * tweetText = textView.text;
    NSString * tweetAccount = [accountButton.titleLabel.text substringFromIndex:1]; // skip @ char
    ....
    

    5. Here are this methods:

    // Single UITextView
    - (UITextView *)tweetTextView:(UIView *)view
    {
        for (UIView * subview in view.subviews)
        {
            if ([subview isMemberOfClass:[UITextView class]])
                return (UITextView *)subview;
            UITextView * textView = [self tweetTextView:subview];
            if (textView) return textView;
        }
        return nil;
    }
    
    // UIButton witch starts from @
    - (UIButton *)twitterAccountButton:(UIView *)view
    {
        for (UIView * subview in view.subviews)
        {
            if ([subview isKindOfClass:[UIButton class]])
            {
                UIButton * button = (UIButton *)subview;
                if (button.titleLabel.text && [button.titleLabel.text rangeOfString:@"@"].location == 0)
                    return button;
            }
            UIButton * button = [self twitterAccountButton:subview];
            if (button) return button;
        }
        return nil;
    }
    

    6. Send tweet manually

    - (void)sendTweet:(NSString *)text fromAccount:(NSString *)account withArtwork:(UIImage *)artwork
    {
        // Create an account store object.
        ACAccountStore *accountStore = [[ACAccountStore alloc] init];
    
        // Create an account type that ensures Twitter accounts are retrieved.
        ACAccountType *accountType = [accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierTwitter];
    
        // Request access from the user to use their Twitter accounts.
        [accountStore requestAccessToAccountsWithType:accountType withCompletionHandler:^(BOOL granted, NSError *error) {
            if(!granted) return;
    
            // Get the list of Twitter accounts.
            NSArray *accountsArray = [accountStore accountsWithAccountType:accountType];
    
            // For the sake of brevity, we'll assume there is only one Twitter account present.
            // You would ideally ask the user which account they want to tweet from, if there is more than one Twitter account present.
            for(ACAccount *twitterAccount in accountsArray)
            {
                if (account && ([account compare:twitterAccount.username options:(NSCaseInsensitiveSearch)] != 0))
                    continue;
    
                // Create a request, which in this example, posts a tweet to the user's timeline.
                // This example uses version 1 of the Twitter API.
                // This may need to be changed to whichever version is currently appropriate.
                NSString * method = artwork ? @"update_with_media" : @"update";
                NSURL * url = [NSURL URLWithString:[NSString stringWithFormat:@"https://api.twitter.com/1.1/statuses/%@.json",method,nil]];
                TWRequest *postRequest = [[TWRequest alloc] initWithURL:url parameters:@{@"status":text} requestMethod:TWRequestMethodPOST];
    
                // Set the account used to post the tweet.
                [postRequest setAccount:twitterAccount];
    
                if (artwork)
                {
                    NSData * data = UIImageJPEGRepresentation(artwork, 0.8);
                    [postRequest addMultiPartData:data withName:@"media" type:@"JPG"];
                }
    
                // Perform the request created above and create a handler block to handle the response.
                [postRequest performRequestWithHandler:^(NSData *responseData, NSHTTPURLResponse *urlResponse, NSError *error) {
                    if (urlResponse.statusCode == 200)
                    {
                        NSLog(@"Tweet sent successfully!");
                    }
                    else
                    {
                        NSDictionary * json = [NSJSONSerialization JSONObjectWithData:responseData
                                                                              options:kNilOptions
                                                                                error:&error];
                        NSLog(@"Tweet sending failed with error: %@", json);
                    }                    
                }];
            }
        }];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone know how to enable or disable programmatically the Quick Edit Mode in
Does anyone know how to disable duplicate comment detection in Wordpress (2.9.2)? I'm looking
Does anyone know how to disable the reload grid button (a.k.a. the refresh button)
Does anyone know of a way to disable the mouse scroll wheel when a
Does anyone know how to disable the tool-tip boxes that popup when a Google
Does anyone know if and how one can disable items in a databound ListBox
Does anyone know if there is a way to disable scroll bars in the
Does anyone know if it is possible to disable the DDMS in Eclipse? By
Does anyone know how to disable the .cshtml extension completely from an ASP.NET Web
Does anyone know how to disable the current link in a breadcrumb trail. I

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.