2012-02-28 8 views
2

ActionSheetなしでShareKitフレームワークを使用することを知っている人はいますか? 私はActionSheetのボタンを使いたくありません。私はカスタマイズ可能な方法を使用したいと思います。ActionSheetなしでShareKitを使用

答えて

1

申し訳ありませんが必要なクラスをインポートすることを忘れていますが、問題はありません。それは動作しません。最後の行はエラーです。

-(IBAction)onClickFacebook:(id)sender;{ 
    NSLog(@"erro"); 
    UIImage *image = [UIImage imageNamed:@"ninja_crouch.jpg"]; 
    SHKItem *item = [[SHKItem alloc] init]; 
    item = [SHKItem image:image title:@"Look at this picture!"];  

    [SHKMail shareItem:item];  

} 
2

共有キーアイテムを作成して、選択した方法f.eを使用して共有を開始するだけです。メールでの共有:

SHKItem *item = [[SHKItem alloc] init]; 
item = [SHKItem image:myUIImage title:@"Name of the image" ]; 
[SHKMail shareItem:item]; 

#import "SHK.h" 
#import "SHKMail.h" 
+0

- (IBAction)onClickFacebook:(ID)、送信者; { のNSLog( "ERRO" @)。 UIImage * image = [UIImage imageNamed:@ "ninja_crouch.jpg"]; SHKItem * item = [[SHKItem alloc] init]; item = [SHKアイテムイメージ:イメージタイトル:@ "この写真を見てください! [SHKMail shareItem:item]; } – user558516

関連する問題