ShareKit changes?

前端 未结 6 1580
醉酒成梦
醉酒成梦 2020-12-28 10:42

I haven\'t used ShareKit much, but I want to have only three sharing options: Facebook, Twitter, and Email. ShareKit gives far more options, including a More button. However

6条回答
  •  爱一瞬间的悲伤
    2020-12-28 11:31

    you can use the below definition for dismissWithClickedButtonIndex:(NSInteger)buttonIndex animated:(BOOL)animated

    you need to delete the few lines which is commented in the below definition.

    - (void)dismissWithClickedButtonIndex:(NSInteger)buttonIndex animated:(BOOL)animated
    {
        // Sharers
        if (buttonIndex >= 0 && buttonIndex < sharers.count)
        {
            [NSClassFromString([sharers objectAtIndex:buttonIndex]) performSelector:@selector(shareItem:) withObject:item];
        }
    
        // More
        //else if (buttonIndex == sharers.count)
    //  {
    //      SHKShareMenu *shareMenu = [[SHKCustomShareMenu alloc] initWithStyle:UITableViewStyleGrouped];
    //      shareMenu.item = item;
    //      [[SHK currentHelper] showViewController:shareMenu];
    //      [shareMenu release];
    //  }
    
        [super dismissWithClickedButtonIndex:buttonIndex animated:animated];
    }
    

提交回复
热议问题