Quantcast
Channel: 睿论坛 - 最新帖子
Viewing all articles
Browse latest Browse all 37470

Help hook Message app

$
0
0

%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


Viewing all articles
Browse latest Browse all 37470

Trending Articles