Latest 0.1.0
Homepage https://github.com/pjocprac/PTBalloonView
License MIT
Platforms ios 8.0, requires ARC
Authors

PTBalloonView / PTBalloonLabel

Version
License
Platform

PTBalloonView and PTBalloonLabel are the view and label, like balloon.
It is easy to use this balloon view and label.
And it can be set balloon’s inflating and deflating animations.

PTBalloonView PTBalloonLabel
PTBalloonView PTBalloonLabel

Description

PTBalloonView is a simple popup view like a balloon. The contentView property is used for your view to be shown in a balloon.

PTBalloonLabel is a simple popup label, which is subclass of PTBalloonView. It have additional properties, title, text, and buttons, instead of contentView.

Requirements

iOS 8.0

Installation

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

pod "PTBalloonView"

Usage

At first, to popup balloon view is only code below. (shows empty balloon.)

let balloonView = PTBalloonView()
balloonView
    .contentView(UIView(frame: CGRectMake(0, 0, 120, 80))) // replace to your content view
    .inflate(TARGET_VIEW) // replace TARGET_VIEW to target view

and deflate balloon is only code below.

balloonView.deflate()

To popup PTBalloonLabel.

let balloonLabel = PTBalloonLabel()
balloonLabel
    .title("PTBalloonLabel Demo")
    .text("This balloon is PTBalloonLabel Demo")
    .addButton(title: "close", type: .Close)
    .inflate(TARGET_VIEW) // replace TARGET_VIEW to target view

Details, see the Demo and the Class Reference.

Balloon Style

To change balloon’s style, you can use methods (named same as properties).

Balloon Animations

To change balloon’s animations, inflateAnimation() and deflatingAnimation() methods can be used.

Class Reference

Class Reference

Demo

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

Balloon Animation

Balloon’s pumping up and deflating animations can be selected.

Pop PopShift Fade
Pop PopShift Fade
FadeShift Revolution RevolutionShift
FadeShift Revolution RevolutionShift
Slide (can chose direction)
Slide

Target Animation

Target view’s animations can be selected also. (It applies only when balloon inflating.)

Pop Blink Rotation Sway
Target Pop Target Blink Target Rotation Target Sway

Author

Takeshi Watanabe, [email protected]

License

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

Latest podspec

{
    "name": "PTBalloonView",
    "version": "0.1.0",
    "summary": "The view and label, like balloon.",
    "description": "PTBalloonView and PTBalloonLabel are the view and label, like balloon.nIt is easy to use this balloon view and label.nThere are balloon inflating and deflating animations to attention.",
    "homepage": "https://github.com/pjocprac/PTBalloonView",
    "license": "MIT",
    "authors": {
        "Takeshi Watanabe": "[email protected]"
    },
    "source": {
        "git": "https://github.com/pjocprac/PTBalloonView.git",
        "tag": "0.1.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "requires_arc": true,
    "source_files": "Pod/Classes/**/*"
}

Pin It on Pinterest

Share This