Latest 0.0.1
Homepage https://github.com/AlekseyPleshkov/UIPopoverCard
License MIT
Platforms ios 9.0, requires ARC
Frameworks UIKit

UIPopoverCard creating bottom slide card for show information.

Screenshot

Installation

CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

To integrate UIPopoverCard into your Xcode project using CocoaPods, specify it in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
use_frameworks!

target '<Your Target Name>' do
pod 'UIPopoverCard', '~> 0.0.1'
end

Then, run the following command:

$ pod install

How to use

You need create class UIPopoverCard and set they UIPopoverCardConfiguration ans UIPopoverCardBody.
Add delegate to UIPopoverCardDelegate in your ViewController for work with events.

// ...

override func viewDidLoad() {
    super.viewDidLoad()
    // ...

    // UIPopoverCard
    let config = UIPopoverCardConfiguration()
    let body = UIPopoverCardBody(xibName: "Test")
    let popoverCard = UIPopoverCard(self, configure: config, body: body)

    popoverCard.show()
    // popoverCard.hide()
    // popoverCard.toggle()

    // ...
}

UIPopoverCardConfiguration params

let config = UIPopoverCardConfiguration()

config.backgroundColor = UIColor.lightGray
config.backgroundBaseAlpha = 0.5
config.cardColor = UIColor.white
config.isShowBackground = true
config.isHideCardBackgroundTap = true
config.animationDuration = 0.3
}

UIPopoverCardBody initialization types

// Create body by uiview
let body = UIPopoverCardBody(view: YOU_UIVIEW)

// Create body from xib name
let body = UIPopoverCardBody(xibName: "Test")

UIPopoverCardDelegate events

// Change visibility state of popover card
popoverCard(_ popoverCard: UIPopoverCard, didVisible: Bool)

About Me

License

UIPopoverCard is released under the MIT license. In short, it’s royalty-free but you must keep the copyright notice in your code or software distribution.

Latest podspec

{
    "name": "UIPopoverCard",
    "version": "0.0.1",
    "summary": "UIPopoverCard creating button popover card with content",
    "authors": "AlekseyPleshkov ",
    "homepage": "https://github.com/AlekseyPleshkov/UIPopoverCard",
    "license": "MIT",
    "source": {
        "git": "https://github.com/AlekseyPleshkov/UIPopoverCard.git",
        "branch": "master",
        "tag": "0.0.1"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source_files": "UIPopoverCard/*.{h,m,swift}",
    "requires_arc": true,
    "frameworks": "UIKit",
    "swift_version": "4.2"
}

Pin It on Pinterest

Share This