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

Help hook Message app

$
0
0

This is my code now:

%hook CKTranscriptCollectionViewController

- (NSArray *)menuItemsForBalloonView:(id)view {

        NSMutableArray *menuItems = [%orig mutableCopy];
        NSString *title = @"Like"[objectAtIndex:0]];
        UIMenuItem *like = [[UIMenuItem alloc] initWithTitle:title action:@selector(star:)];
        [menuItems insertObject:like atIndex:0];
        return menuItems;
    [menuItems release];
}

%new
- (void)balloonView:(id)view star:(id)sender {
NSLog(@"Like clicked");
}

%end

%hook CKBalloonTextView
- (void)setAttributedText:(id)arg1{
    %orig (arg1);
    %log(arg1);
}

%end

Viewing all articles
Browse latest Browse all 37470

Trending Articles