Skip to content
VilemKurz edited this page Nov 13, 2011 · 32 revisions

Q: Is it possible to make the shared item text or title slightly different for each sharer service?

A: YES. You can use SHKCustomActionSheet, and override

- (void)dismissWithClickedButtonIndex:(NSInteger)buttonIndex animated:(BOOL)animated
{
    [[VariableWarehouse sharedInstance] playSound:@"touch"];    
    [self changeItemForService:buttonIndex];
    [super dismissWithClickedButtonIndex:buttonIndex animated:animated];  
}

- (void)changeItemForService:(NSInteger)buttonIndex
{
    if (buttonIndex == 1) {
        self.item.text = [self.item.text stringByAppendingString:@"suffix for service 1"];
    }
}

if you do this, it is recommended that you first copy SHKCustomActionSheet.m file outside of ShareKit submodule folder, and replace the file in the project instead of original ShareKit version. Then edit the "outside" file. This way it will not interfere with ShareKit submodule updates.

Clone this wiki locally