%hook CKTranscriptCollectionViewController
- (NSArray *)menuItemsForBalloonView:(id)view {
NSMutableArray *menuItems = [%orig mutableCopy];
NSString *title = @"Like"[objectAtIndex:0]];
UIMenuItem *like = [[UIMenuItem alloc] initWithTitle:title action:@selector(balloonView:star:)];
[menuItems insertObject:like atIndex:0];
return menuItems;
[menuItems release];
}
%new
- (void)balloonView:(id)view star:(id)sender {
NSLog(@"%@"self.attributedString);
}
%end
You'll have to craft a header to avoid method not found error.
Check NSAttributedString.h for hints on how to convert NSAttributedString to NSString