Skip to content

Instantly share code, notes, and snippets.

@basuke
Created July 16, 2010 02:51
Show Gist options
  • Save basuke/477858 to your computer and use it in GitHub Desktop.
Save basuke/477858 to your computer and use it in GitHub Desktop.
NSRange range;
NSString *str = @"";
if (type == PostTweetTypePublicRepyType) {
str = @"Reply";
range = NSMakeRange([str length], 0);
} else if (type == PostTweetTypeRetweetType) {
str = @"Retweeted";
range = NSMakeRange(0, 0);
} if (type == PostTweetTypePublicRepyToUserType) {
str = @"PublicReply";
range = NSMakeRange([str length], 0);
} else {
range = NSMakeRange(0, 0);
}
[mergedState setObject:str forKey:@"text"];
[mergedState setObject:NSStringFromRange(range) forKey:@"range"];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment