DMActivityInstagram
DMActivityInstagram copied to clipboard
Skipping Resize Controller
Thanks for this great library. Is there any way to skip the steps for resizing/rotating the image? My project already does all the checking for making sure the image is square and large enough.
Thanks again, Bill
Hey Bill,
Right now, if you pass a square image to the DMActivityInstagram, the current behaviour should be to show the resize/crop view for a moment and then go right to the UIDocumentInteractionController. If you'd like skip the resize/crop view entirely, your best bet is probably to subclass DMActivityInstagram so you can return nil from it's -activityViewController
method, which will prevent the resize controller from being shown. That should be enough get what you want, but I've not built it to perform that way so you may want to do some QC on that and make sure it doesn't muck anything else up.
A pull request with this behaviour as an optional feature would be welcomed :)
Thanks for the response! I've tried returning nil from activityViewController
and the default behavior correctly calls the performActivity
method. The UIDocumentInteractionController doesn't open, however, because I think it is expecting to be opened via a button on the ResizerViewController.
I'm not sure exactly how to get the document controller to open, I'll take a look at that further.
Thanks, Bill
DMActivityInstagram has a property (presentFromButton) that accepts a UIBarButtonItem to present the document interaction controller from. Try setting that, if you have a bar button you can use. Otherwise you'll have to modify - (void)performActivity
, specifically the last line where it presents the document interaction controller.
On Nov 3, 2013, at 5:56 AM, Bill Rollins [email protected] wrote:
Thanks for the response! I've tried returning nil from activityViewControllerand the default behavior correctly calls the performActivity method. The UIDocumentInteractionController doesn't open, however, because I think it is expecting to be opened via a button on the ResizerViewController.
I'm not sure exactly how to get the document controller to open, I'll take a look at that further.
Thanks, Bill
— Reply to this email directly or view it on GitHub.
If you don't have a UIBarButtonItem
that you can use, you can actually just present the UIDocumentInteractionController
using - (BOOL)presentOpenInMenuFromRect:(CGRect)rect inView:(UIView *)view animated:(BOOL)animated
. Pass in CGRectZero
and the view
of your UIActivityViewController
. Works great.
Hi @DimaVartanian @coryalder @rollinsw , could you give a little example code on how to accomplish this? I really can not get this to work without showing the resize controller. Thanks!