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

  • Home
  • SEARCH
  • 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 8458669
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T13:08:31+00:00 2026-06-10T13:08:31+00:00

I am using the TWTweetComposeViewController, and when I set the initial text to the

  • 0

I am using the TWTweetComposeViewController, and when I set the initial text to the title of the screen, the text cursor appears after the hashtag, and I want to have it appear before the hashtag. Is there a way to do something like cursor=(0,0) or something like that? I looked in the documentation and there’s nothing there.

For reference, this is what I’m using.

TWTweetComposeViewController *tweetSheet = [[TWTweetComposeViewController alloc]init];
[tweetSheet setInitialText:[NSString stringWithFormat:@"#%@", self.title]];
tweetSheet.completionHandler = ^(TWTweetComposeViewControllerResult result){
    [self dismissModalViewControllerAnimated:YES];
};
[self presentModalViewController:tweetSheet animated:YES];
  • 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-10T13:08:33+00:00Added an answer on June 10, 2026 at 1:08 pm

    I looked for the exact same thing. It can be done with a little hack. This is the source http://www.sunetos.com/items/2012/06/04/cleanly-accessing-the-uitextview-field-in-twtweetcomposeviewcontroller-2/

    According to the author the app was approved for the app store.

    // at an appropriate place in your code, 
    // add and remove the observer for UIKeyboardWillShowNotification
    
    [[NSNotificationCenter defaultCenter] addObserver:self
                                             selector:@selector(handleKeyboardWillShow:) 
                                                 name:UIKeyboardWillShowNotification 
                                               object:nil];
    
    - (UIView *) findFirstResponderInView:(UIView*) view
    {
        if (view.isFirstResponder) {
            return view;
        }
        for (UIView *subview in view.subviews) {
            UIView *result = [self findFirstResponderInView:subview];
            if (result) {
                return result;
            }
        }
        return nil;
    }
    
    - (void) handleKeyboardWillShow:(NSNotification *) notification;
    {
        UIView *fr = [self findFirstResponder:self.tweetSheetViewController.view];
        if ([fr isKindOfClass:[UITextView class]]) {
            UITextView *tv = (UITextView *) fr;
            [tv setSelectedRange:NSMakeRange(0,0)];
        }
    }
    

    Did implement it like this in my app, so if you need further help let me know.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using restlet, I want to make a post to android's c2dm service. I have
I am trying to set the initial text for what the twitter message should
I added Twitter to my iOS app. I'm using iOS 5's TWTweetComposeViewController in ShareKit.
Using a populated Table Type as the source for a TSQL-Merge. I want to
Using android 2.3.3, I have a background Service which has a socket connection. There's
Using WPF/PRISM I want to log my messages through ILoggerFacade to my GUI (A
Using MVC2 I have an AJAX form which is posting to a bound model.
Using php/html, I want to retrieve email addresses (plus other information) from MySQL and
I'm using the TWTweetComposeViewController within my application. If the user locks device (or switches
Using WebViewBrush I can render web page content (it's screen shot) to e.g. Rectangle

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.