In a series of previous posts I wrote about the integrated Twitter support that was introduced in iOS 5. If you are creating a custom control such as a UITextField or UITextView, there is a keyboard type specifically designed for writing tweets – the keyboard includes the characters @ and # on the primary view (no tapping necessary for a secondary keyboard view).
The image below shows the new keyboard:
The following code example shows how to set the twitter keyboard in a UITextView:
UITextView *twitterView; ... twitterView = [[UITextView alloc] initWithFrame:CGRectMake(10, 40, 300, 100)]; [twitterView setBackgroundColor:[UIColor whiteColor]]; [twitterView setFont:[UIFont fontWithName:@"Arial" size:18]]; [twitterView setKeyboardType:UIKeyboardTypeTwitter]; [[self view] addSubview:twitterView];