sharekit :: EXC_BAD_ACCESS @의 shareItem
...
// --- add the mail button ------------------------------------
UIButton *buttonMail = [UIButton buttonWithType:UIButtonTypeCustom];
buttonMail.frame = CGRectMake(0,0, btnW, btnH);
[buttonMail setImage:[UIImage imageNamed:@"btn_mail.png"] forState:UIControlStateNormal];
[buttonMail addTarget:self action:@selector(sendPerMailEvent:) forControlEvents:UIControlEventTouchUpInside];
...
// the sharekit image object
item = [SHKItem image:image title:@"Name of the image" ];
item.text = @"some text...";
[SHK setRootViewController:self.webView.window.rootViewController];
...
및
-(void)sendPerMailEvent:(id)sender {
[SHKMail shareItem:item];
[self closeScreenshotView];
}
하지만 내 자신의 버튼을 actionSheet을 사용하고 있지만 사용하지 않고 shareKit의 도움으로 이미지를 보내려고
난을 클릭하면
+ (id)shareItem:(SHKItem *)i
{
[SHK pushOnFavorites:[self sharerId] forType:i.shareType]; // -> EXC_BAD_ACCESS
: 버튼 엑스 코드는 shareItem()의 첫 번째 줄에 나에게 "
EXC_BAD_ACCESS"오류를 던지고있다
나는 objective-c에 새로 왔으며 app는 phonegap을 사용하여 만들어졌다. thnx!
이미지를 가져온 SHKItem에 항목을 설정할 때? 나는 그것을 초기화하기 전에 [SHKItem image : image title : @ "이미지의 이름"]; – xanderer
이미지가 있고 기다리고 있습니다 : 'UIImage * image = UIGraphicsGetImageFromCurrentImageContext(); ... image = [[UIImage alloc] initWithCGImage : image.CGImage scale : 1.0f orientation : UIImageOrientationLeft]; ' 내 .h 파일에서'@interface MyPlugIn : PGPlugin {NSString * callbackID ; SHKItem * 항목; } @property (nonatomic, copy) NSString * callbackID; ' – headkit