Latest 1.0
Homepage https://github.com/trmbhs/EMPopView
License MIT
Platforms ios 10.0, requires ARC
Authors

A popview framework with Swift 3.0 includes LoadingView, ProgressView, SheetView and AlertView.

中文介绍

你可以在「这里」找到详细的中文介绍和扩展方法。

Requirements

  • iOS 10
  • Xcode 8

Integration

Use cocoaPods like this:

pod `EMPopView`

Usage

Example

Just read the code in example.

Regist

To let popview know when the screen rotation. Put this code in AppDelegate.

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
        EMPopViewFactory.regist()
        return true
    }

Config

Before use the popview, we need to create a config object.

    let config = EMLoadingViewConfig.init(colorStyle: .white,
                                          showAniStyle: .fadeIn,
                                          closeAniStyle: .fadeOut)

Show

Now we get an EMLoadingViewConfig. We can use it to config an EMLoadingView like this:

    let index = EMPopViewFactory.showView(withType: .loading, config: config)

Close

The value of index is the index of the EMLoadingView we already buld. When we want to close this view, we need to let EMPopViewFactory know the index.

    EMPopViewFactory.closeView(withIndex: index)

Extension

Edit the code.
Add some option in EMPopViewShowAnimationStyle and EMPopViewCloseAnimationStyle to extension animations.
Add some option in EMPopViewColorStyle to extension skins.

Latest podspec

{
    "name": "EMPopView",
    "version": "1.0",
    "license": {
        "type": "MIT"
    },
    "summary": "A popview framework for iOS writen by Swift 3.0.",
    "homepage": "https://github.com/trmbhs/EMPopView",
    "authors": {
        "Enum": "[email protected]"
    },
    "platforms": {
        "ios": "10.0"
    },
    "source": {
        "git": "https://github.com/trmbhs/EMPopView.git",
        "tag": "1.0"
    },
    "source_files": "EMPopView/*",
    "requires_arc": true,
    "pod_target_xcconfig": {
        "SWIFT_VERSION": "3.0"
    }
}

Pin It on Pinterest

Share This