Latest 0.1.8
Homepage https://github.com/matadesigns/simpleviews
License MIT
Platforms ios 9.0, requires ARC
Authors

Version
License
Platform

A framework to simplify complex views and allow for simple animation of views.

Requirements

  • iOS 9.0+

Usage

SimpleTableView

What is this?

This a subclass of UITableView which makes it SIMPLE to do things like.

  • Have a loading view before the table is displayed, useful while you’re waiting for a network call to return.
  • Have a failed view if your network call failed.
  • Have a empty view that is shown when the table has no data yet.
  • Have transitions between loading, empty, finished, and failed states.

How do I use it?

Look at example inside the project for now.

SimpleAnimation

What is this?

Makes animating views onto the screen and off the screen. Only tested using storyboards so far

There are few simple animations currently, these animations have two states in and out.

  • fade – Which simply fades a view onto or off the screen.
  • leftToRight
    • In – Will animate the view from off screen left to its position specified in storyboard using constraints.
    • Out – Will animate the view from its original position to off screen right.
  • rightToLeft – is LeftToRight but in the opposite direction.
  • slideUp
    • In – Will animate the view from off screen bottom to its position specified in storyboard using constraints.
    • Out – Will animate the view from its original position to off screen top.
  • slideDown

How do I use it?

You can perform a SimpleAnimation on any UIView or subclass of UIView aka (UIButton, UITableView, etc..)

Take a look at the example project the IBOutlet errorStackView are animated using SimpleAnimation.

Example Code

class ExampleViewController: UIViewController {
  @IBOutlet weak var contentView: UIView!

  override func viewDidLoad() {
        super.viewDidLoad()
        // You need to initialize anything that has an in animation, in this case contentView.
        SimpleAnimation.initialize(views: [contentView])
  }

  override func viewDidAppear(_ animated: Bool) {
    super.viewDidAppear(animated)
    contentView.perform(animation: .fade, forDuration: 0.7, withState: .in)
  }

  override func viewWillDisappear(_ animated: Bool) {
      super.viewWillDisappear(animated)
      contentView.perform(animation: .fade, forDuration: 0.7, withState: .out)
  }

}

Latest podspec

{
    "name": "SimpleViews",
    "swift_versions": "5.0",
    "version": "0.1.8",
    "summary": "A framework to simplify complex views, like UITableView.",
    "homepage": "https://github.com/matadesigns/simpleviews",
    "license": "MIT",
    "authors": {
        "Nicholas Mata": "[email protected]"
    },
    "platforms": {
        "ios": "9.0"
    },
    "requires_arc": true,
    "source": {
        "git": "https://github.com/matadesigns/simpleviews.git",
        "tag": "0.1.8"
    },
    "source_files": "SimpleViews/SimpleViews/**/*.{h,swift}"
}

Pin It on Pinterest

Share This