Latest 0.1.4
Homepage https://github.com/leavesster/YLFPopoverBackgroundView
License MIT
Platforms ios 5.0
Frameworks UIKit

CI Status
Version
License
Platform

Example

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

How to use

use UIPopoverPresentationController as normal, just add :

vc.popoverPresentationController.popoverBackgroundViewClass = [YLFPopoverNoShadowBackgroundView class];

@import YLFPopoverBackgroundView;
...

- (void)showPopoverViewController:(UIViewController *)vc sourceView:(UIView *)sourceView
{
    vc.preferredContentSize = CGSizeMake(100, 60);
    vc.view.backgroundColor = [UIColor brownColor];

    vc.modalPresentationStyle = UIModalPresentationPopover;
    UIPopoverPresentationController *present = vc.popoverPresentationController;
    // just one line code
    vc.popoverPresentationController.popoverBackgroundViewClass = [YLFPopoverNoShadowBackgroundView class];
    present.delegate = self;
    present.sourceView = sourceView;
    present.sourceRect = sourceView.bounds;
    [self presentViewController:vc animated:YES completion:nil];
}

Requirements

For UIPopoverPresentationController, you need iOS 8+.
But for UIPopoverController, you only need iOS 5+.

Installation

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

pod 'YLFPopoverBackgroundView'

Author

leavesster

License

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

Latest podspec

{
    "name": "YLFPopoverBackgroundView",
    "version": "0.1.4",
    "summary": "support custom PopoverBackgroundView for UIPopoverPresentationController",
    "description": "YLFPopoverBackgroundView help you customize UI for UIPopoverPresentationController background;",
    "homepage": "https://github.com/leavesster/YLFPopoverBackgroundView",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": "leavesster",
    "source": {
        "git": "https://github.com/leavesster/YLFPopoverBackgroundView.git",
        "tag": "0.1.4"
    },
    "platforms": {
        "ios": "5.0"
    },
    "source_files": "YLFPopoverBackgroundView/Classes/**/*",
    "resource_bundles": {
        "YLFPopoverBackgroundView": [
            "YLFPopoverBackgroundView/Assets/*.png"
        ]
    },
    "frameworks": "UIKit"
}

Pin It on Pinterest

Share This