Coder Social home page Coder Social logo

applelfq / zhpopupcontroller Goto Github PK

View Code? Open in Web Editor NEW

This project forked from snail-z/zhpopupcontroller

0.0 2.0 0.0 5.4 MB

Popup your custom view is easy, support custom mask style, transition effects and gesture to drag.

License: MIT License

Ruby 0.46% Objective-C 83.62% Objective-C++ 10.24% C 2.94% Shell 2.73%

zhpopupcontroller's Introduction

zhPopupController

Language Version License Platform

Popup your custom view is easy, support custom mask style, transition effects and gesture to drag.

Example

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

Requirements

  • Requires iOS 7.0 or later
  • Requires Automatic Reference Counting (ARC)

Installation

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

platform :ios, '7.0'
use_frameworks!

target 'You Project' do
    
	pod 'zhPopupController', '~> 1.0.1'
    
end

Preview

Usage

  • Direct use of zh_popupController popup your custom view.
    [self.zh_popupController presentContentView:customView];
  • Customize.
    self.zh_popupController = [zhPopupController popupControllerWithMaskType:zhPopupMaskTypeWhiteBlur];
    self.zh_popupController.layoutType = zhPopupLayoutTypeLeft;
    self.zh_popupController.allowPan = YES;
    // ...
    [self.zh_popupController presentContentView:customView];

Notes

  • Update (September 11, 2017 v0.1.6)

    • Support dismiss automatically.
/**
 present your content view.
 @param contentView This is the view that you want to appear in popup. / 弹出自定义的contentView
 @param duration Popup animation time. / 弹出动画时长
 @param isSpringAnimated if YES, Will use a spring animation. / 是否使用弹性动画
 @param sView  Displayed on the sView. if nil, Displayed on the window. / 显示在sView上
 @param displayTime The view will disappear after `displayTime` seconds. / 视图将在displayTime后消失
 */
- (void)presentContentView:(nullable UIView *)contentView
                  duration:(NSTimeInterval)duration
            springAnimated:(BOOL)isSpringAnimated
                    inView:(nullable UIView *)sView
               displayTime:(NSTimeInterval)displayTime;

  • Update (September 13, 2017 v0.1.7)

    • Content layout fixes

    • Observe to keyboard changes will change contentView layout

    • New offsetSpacingOfKeyboard properties. You can through it adjust the spacing relative to the keyboard when the keyboard appears. default is 0

      The pan gesture will be invalid when the keyboard appears.


  • Update (September 21, 2017 v0.1.8)

    • Support ios11 system version

    • When system is larger than iOS 8 will use of UIVisualEffectView to do mask blur effect.

Author

snail-z, [email protected]

License

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

zhpopupcontroller's People

Contributors

snail-z 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.