Giter VIP home page Giter VIP logo

cnppopupcontroller's Introduction

Pod Version Pod Platform Pod License Dependency Status

CNPPopupController

Version 1.0 is coming Click here to add your feedback.

Introduction

CNPPopupController is a simple and versatile class for presenting a custom popup in a variety of fashions. It includes a many options for controlling how your popup appears and behaves.

Please feel free to contribute to this project, open issues, make suggestions and submit pull-requests. If you use this project in your app, let me know. I'd love to see what you do with it.

Installation

Available in CocoaPods

pod 'CNPPopupController'

##Usage

(See sample Xcode project in /CNPPopupControllerExample)

Creating a Popup

Create a popup with custom animations and behaviors. Customizations can also be accessed via properties on the CNPPopupTheme instance:

- (instancetype)initWithContents:(NSArray *)contents;

contents only accepts an array of UIView objects.

Presentation

- (void)presentPopupControllerAnimated:(BOOL)flag;

- (void)dismissPopupControllerAnimated:(BOOL)flag;

Customization

A CNPPopupTheme instance can be created and assigned to the theme property of a CNPPopupController instance.

@property (nonatomic, strong) UIColor *backgroundColor;

@property (nonatomic, assign) CGFloat cornerRadius;

@property (nonatomic, assign) UIEdgeInsets popupContentInsets;

@property (nonatomic, assign) CNPPopupStyle popupStyle;

@property (nonatomic, assign) CNPPopupPresentationStyle presentationStyle;

@property (nonatomic, assign) CNPPopupMaskType maskType;

@property (nonatomic, assign) BOOL dismissesOppositeDirection;

@property (nonatomic, assign) BOOL shouldDismissOnBackgroundTouch;

@property (nonatomic, assign) BOOL movesAboveKeyboard;

@property (nonatomic, assign) CGFloat contentVerticalPadding;

@property (nonatomic, assign) CGFloat maxPopupWidth;

@property (nonatomic, assign) CGFloat animationDuration;

Notes

Deployment

CNPPopupController works on iOS 6 - iOS 10

##Credits CNPPopupController was created by Carson Perrotti

##Version History

September 15, 2016 v0.3.3

  • Content layout fixes
  • Better swift support

July 14, 2016 v0.3.2

  • Fixes an issue where content would not be perfectly centred.
  • Project compatibility fixes to prevent duplicate symbols errors.
  • Added property to adjust animation transition duration.

September 13, 2015 v0.3.1

  • Sets movesAboveKeyboard to YES in the default theme.

September 11, 2015 v0.3.0

  • Support for iOS 9 and a few bug fixes.

August 30, 2015 v0.2.3

  • Lower minimum required OS version to 6.0, since it works there anyway.

August 16, 2015 v0.2.2

  • Bug fix for centering the popup above the keyboard when presented. Thanks to Nicholas for the proactive help on this one.

June 14th, 2015 v0.2.0

  • Completely rewritten. Started from the bottom, now we're here.
  • There are some minor API changes in v0.2.0. I tried to keep it as close to the last version as possible. See the example project if you need some help getting it set up.
  • Custom view support (You can add anything, as it's contents as long as it is a UIView or subclass of UIView
  • Lots of bug fixes

cnppopupcontroller's People

Contributors

vfxdrummer avatar zengkai00 avatar coneybeare avatar nicholas avatar ppaulojr avatar readmecritic avatar vernsu avatar nallwhy avatar ogoldfinger avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.