Draggable, sizeable view which can placed in screen edges. Similar to FaceTime and PiP.


To run the example project, clone the repo, and run pod install from the Example directory first.

// Your gorgeous content view
UIView *contentView = [UIView new];
contentView.backgroundColor = [UIColor redColor];

// Init Picture in Picture view
self.pipView = [[GKPictureInPictureView alloc] initWithContentView:contentView];

// Show it
[self.pipView addToSuperView:self.blue animated:YES];



iOS 10


GKPictureInPictureView is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'GKPictureInPictureView'


GKPictureInPictureView can be used either by initializing it from code (see the Example above) or by using Storyboards.


  1. Create your content view. It will be constrainted to the draggable view's edges, so don't add any constraints which can conflict with the size or position
  2. Create a GKPictureInPictureView and init it with -initWithContentView:
  3. Add it to your superview: -addToSuperView:animated:.


  1. Create a UIView. You can create whatever subviews you want, but don't set any constraints to width, height and position
  2. Change the class of the view to GKPictureInPictureView


There are plenty of options you can choose from. For example you can prevent the view to go to certain edges by setting NO on options like bottomLeftPositionEnabled. You can also disable zooming. See GKPictureInPictureView.h headers for details.