Introducing Magic Selection View: Brand New Tech from Adobe Labs

Posted on Thursday, June 4th, 2015 by Swati Teerdhala
Category: iOS

We’re extremely excited to announce that, for the first time ever, we have added exclusive new technology from Adobe Labs into the most recent version of the iOS Creative SDK. With Magic Selection View, you can use our latest technology to identify and pull selected portions of the image out of the foreground – with just two fingers! This new feature, Magic Selection View can be found in the AdobeCreativeSDKLabs.framework. This is just one example of how we’re continuing to evolve our creative tools and reimagine them for new mobile workflows.

The AdobeLabsUXMagicSelectionView class is similar to a combination of UIScrollView and UIImageView – it will display an image and let you scroll and pan the image. Simply instantiate it, add it as a subview to your view, and call setImage:

 magicSelectionView = [[AdobeLabsUXMagicSelectionView alloc] initWithFrame: self.view.bounds];
 [magicSelectionView setImage: myImage withCompletionBlock: myCompletionBlock];
 [self.view addSubview: magicSelectionView];

Note: setImage is asynchronous and requires the use of a completionBlock for robust operation. See the sample app (link below) for details.

Once the image is set, the magic selection view is ready to use:

s1

Unlike UIScrollView, panning is done with two fingers; the single finger gesture in the Magic Selection View is used for painting the magic selection:

s2

Once the selection is painted you can extract the selected foreground bits from the image:

s3

In order to use the Magic Selection View, you must add both the AdobeCreativeSDKLabs.framework and the AdobeCreativeSDKFoundation.framework in addition to a few dependent frameworks to your xCode app project’s “Link Binary With Libraries” build phase. Be sure to also add AdobeCreativeSDKFoundationResources.bundle to your “Copy Bundle Resources” build phase:

s4

Finally, Magic Selection View requires an iOS Deployment Target of 8.0 or greater and requires the -ObjC Other Linker Flag:

s5

And that’s it! With the Creative SDK you can give your users this powerful technology in just a few steps. You can find a complete example of this by downloading a sample project here.

Disclaimer: This Adobe Labs component is a beta product, and is provided with limited support. As with all of our SDKs, feedback is welcome.

update-button

Comments

  1. uttam

    In Magic Selection View this is no example code in the gitHub. Could you please tell me how to extract selected image ?

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>