Latest 0.1.1
Homepage https://github.com/ctwdtw/PLStrechyViewController
License MIT
Platforms ios 9.0
Authors

CI Status
Version
License
Platform

Description

PLStrechyVieController is a simple view controller which contains a strechy UIView and a UITextField. The strechy effect is a autolayout based animation and it supports both portrait and landscape orientation.

Demo

Alt text

Usage

Just subclass the widget and assign the text and image in the viewDidLoad method:

class MYViewController: PLStrechyViewController {

  override func viewDidLoad() {
    super.viewDidLoad()
    let image = UIImage(named: "your awesome image")
    self.feedImage = image
    self.feedText = "your awesome text"

    //if you use your view controller inside a navigation controller, 
    //you may want to assign the title of navigation item also
    self.navigationItem.title = "your awesome navigation item title"
  }
}

then assign your ViewController’s Class field in Storyboard as MYViewController, that’s it.

Example

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

Requirements

  • Swift 3.0 +
  • iOS 9.0 +

Installation

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

pod 'PLStrechyViewController'

Author

ctwdtw, [email protected]

License

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

Latest podspec

{
    "name": "PLStrechyViewController",
    "version": "0.1.1",
    "summary": "A simple view controller which contains a strechy UIView and a UITextField",
    "description": "A simple view controller which contains a strechy UIView and a UITextField. The strechy effect is a autolayout based animation.",
    "homepage": "https://github.com/ctwdtw/PLStrechyViewController",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "ctwdtw": "[email protected]"
    },
    "source": {
        "git": "https://github.com/ctwdtw/PLStrechyViewController.git",
        "tag": "0.1.1"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source_files": "PLStrechyViewController/Classes/**/*",
    "resource_bundles": {
        "PLStrechyViewController": [
            "PLStrechyViewController/Assets/*.png"
        ]
    },
    "pushed_with_swift_version": "4.0"
}

Pin It on Pinterest

Share This