0

recently i used shareKIt to develop share property on my iPhone app, and have added the required frameworks as they instructed, but while running their is no errors but number or compiler warnings. also when i click Facebook/ twitter from action sheet the apps get stuck and crashes..

i got the error on SHKActionSheet.m saying badAccess

- (void)dealloc
{
[item release];
[sharers release];
[super dealloc];
}

and compiler warning on

SHKActionSheet *as = [[SHKActionSheet alloc] initWithTitle:SHKLocalizedString(@"Share")
                                                      delegate:self
                                             cancelButtonTitle:nil
                                    destructiveButtonTitle:nil
                                         otherButtonTitles:nil];

saying

incomplete pointer type sending "Class" to parameter of type 'id< UIActionSheetDelegate >'

need some help, else is their any other way to implement share property?

Parth Bhatt
  • 19,381
  • 28
  • 133
  • 216
Neeraj Neeru
  • 570
  • 8
  • 28
  • I think we will need to see more of your code to debug it properly. However, I think your second issue is that you are passing self as the delegate to SHKActionSheet but SHKActionSheet is expecting an object that conforms to the UIActionSheetDelegate protocol. Try adding the UIActionSheetDelegate protocol to your interface definition. – mttrb Apr 09 '12 at 06:18
  • @parth yes,that clears the warning.. thank you – Neeraj Neeru Apr 10 '12 at 11:21

1 Answers1

0

you use wrong alloc method of SHKActionSheet, use following code.

SHKItem *item = [SHKItem text:@"test"];
SHKActionSheet *actionSheet = [SHKActionSheet actionSheetForItem:item];

[actionSheet showFromRect:CGRectMake(0, 0, 320, 250) inView:self.view animated:YES];
priyanka
  • 2,076
  • 1
  • 16
  • 20
  • yes, now the action sheet works fine, tank you for your replay.. but still i have some problem , cancel button is not working.. i mean if i selected the twitter/more option a modal view is presented with cancel button at the top left side of navigation bar. is not working, am tested this only on simulator..., will this work on real device? else where do i change the code to work.. i didn't yet find out the path, thankyu – Neeraj Neeru Apr 10 '12 at 11:07