Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
Demo
TPComposeView
LICENSE.txt
README.md

README.md

TPComposeView

TPComposeView is a simple modal view which allows the user to quickly compose text similar to the integrated TWTweetComposeViewController in iOS 5 (landscape support will be added soon).

image

Installation

  • Drag the TPComposeView/TPComposeView folder into your project.

Usage

TPComposeView can be used in the same way as TWTweetComposeViewController. Set the completionHandler block and you are ready to go. Example:

TPComposeView *composeView = [[TPComposeView alloc] initWithInitialText:@"Some text..."];
composeView.title = @"Compose";
composeView.completionHandler = ^(TPComposeViewResult result, NSString *text){
    switch (result) 
    {
        case TPComposeViewResultCancelled:
            // Cancelled
            break;

        case TPComposeViewResultDone:
            // Do some magic with the text
            break;                
    }
};
[composeView presentComposeView];
[composeView release];   

Present the compose view using presentComposeView method. To limit the number of characters set the maxValue for maxChars (it will automatically show the char indicator).

Optional methods

There are some additional methods you can use. See the header file.

Something went wrong with that request. Please try again.