Latest 0.1.0
Homepage https://github.com/gklka/GKPictureInPictureView
License MIT
Platforms ios
Authors

Version
License
Platform

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

Example

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];

Example

Requirements

iOS 10

Installation

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

pod 'GKPictureInPictureView'

Usage

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

Code

  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:.

Storyboards

  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

Finetuning

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.

Author

gklka, [email protected]

License

GKPictureInPictureView is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "GKPictureInPictureView",
    "version": "0.1.0",
    "summary": "FaceTime/iOS PiP like throwable view",
    "description": "Draggable, sizeable view which can placed in screen edges. Similar to FaceTime and PiP.",
    "homepage": "https://github.com/gklka/GKPictureInPictureView",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "gklka": "[email protected]"
    },
    "source": {
        "git": "https://github.com/gklka/GKPictureInPictureView.git",
        "tag": "0.1.0"
    },
    "social_media_url": "https://twitter.com/gklka",
    "platforms": {
        "ios": null
    },
    "source_files": "GKPictureInPictureView/Classes/**/*"
}

Pin It on Pinterest

Share This