0

I have a custom sharer with ShareKit that redirects to an UIViewController of my application to do some actions. Normally I use this code to do that task on the iPhone

//Create a new snippet with the item to be shared
Snippet * selectedSnippet = [[Snippet alloc] initWith: item.title :item.text :@"" : 0];

//pass the item to the controller
detailsController.currentSnippet = selectedSnippet;

//Show view controller with the navigation controller
[[SHK currentHelper] showViewController: detailsController]; 

But this shows my UIViewController cropped, my guess is because it's being shown as a modal window, so I also tried:

[[self navigationController] pushViewController: detailsController animated: YES];

Instead of the last line and no luck. What I want is to show an UIViewController from my sharer but using the whole screen for it.

Thanks in advance

David Conde
  • 4,631
  • 2
  • 35
  • 48

1 Answers1

0

Do not use [SHK currentHelper]. For inspiration, look at how SHKiOS5Twitter presents its UI in ShareKit 2.0

Here are the steps:

  1. check if there is no ShareKit's menu, or other ShareKit's view opened. If it is, close it and continue after close notification.
  2. find current top view controller, ShareKit 2.0 has a special function for this.
  3. then simply use UIView's presentViewController:animated:completion: method
Vilém Kurz
  • 3,401
  • 2
  • 34
  • 43