Latest 0.1.0
Homepage https://github.com/aruffolo/MovingArcsView
License MIT
Platforms ios 8.0
Frameworks UIKit
Authors

Version
License
Platform

Overview

MovingArcsMenu is a subclass of UIView, written in Swift, that creates a bottom right menu

Example

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

Requirements

  • iOS 8
  • Swift 4.0

Installation

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

pod 'MovingArcsMenu'

Usage

Add the view into the storyboard or create it from code, after you have a reference to it you should initialize its paramteters. In the example below appearence and tag for the buttons in the arcs are setted.
Tag are useful to tell which button has been tapped. Array of strings are passed to let the view import the images for the buttons inside the arcs


let viewsOnExternalArc: ArcsButtonsNumber = .five
let viewsOnMiddleArc: ArcsButtonsNumber = .three

let tagsForButtonsInExternalArc: [Int] = [24, 28, 27, 25, 26]
let tagsForButtonsInMiddleArc: [Int] = [23, 22, 21]

do
{
  let tuple = (innerArcColor: deepMarineBlue, middleArcColor: deepMarineBlue, externalArcColor: deepMarineBlue, innerArcShadowColor: waterGreen, middleArcShadowColor: waterGreen, externalArcShadowColor: UIColor.black)
  try arcsView.initParameters(viewsOnExternalArc: viewsOnExternalArc,
  viewsOnMiddleArc: viewsOnMiddleArc,
  tagsForButtonsInExternalArc: tagsForButtonsInExternalArc,
  tagsForButtonsInMiddleArc: tagsForButtonsInMiddleArc,
  arcColors: tuple, buttonScale: 0.33,
  imagesForExternalArc: ["CloseIcon", "CloseIcon", "CloseIcon", "CloseIcon", "CloseIcon"],
  imagesForMiddleArc: ["CloseIcon", "CloseIcon", "CloseIcon"],
  imagesForInnerArc: ["CloseIcon"])
}
catch ArcsViewsError.viewsNUmberAndTagsNumberMismatch(let errorMessage)
{
  print(errorMessage)
}
catch
{
  print(error)
}

The view is opened or closed using the animation functions provided:


@IBAction func showHideArcsAction(_ sender: UIButton)
{
  /// this one animate the opening animation of the arcs
  arcsView.start()
}

private lazy var viewsOnArcTapped: ((_ sneder: UITapGestureRecognizer) -> Void)? = { [unowned self] sender in
  /// this one closes the animation of the arcs
  self.arcsView.revertAnimations()
}

Author

Antonio Ruffolo

License

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

Latest podspec

{
    "name": "MovingArcsMenu",
    "version": "0.1.0",
    "summary": "MovingArcsMenu is a sublcass of UIView that let you have a buttons inside arcs at the bottom right of a view",
    "description": "MovingArcsMenu is a UIView subclass that let you have buttons inside arcs on the bottom right of a view. The buttons inside the view can have just a backgound image. The arcs ar shown and hidden using a cool animation.nIt is possible to customize the number of buttons, the color of the arcs and their shadow.nMovingArcsMenu is very useful to create a bottom right menu, this position is the most accesible on every smartphone.",
    "homepage": "https://github.com/aruffolo/MovingArcsView",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "aruffolo": "[email protected]"
    },
    "source": {
        "git": "https://github.com/aruffolo/MovingArcsView.git",
        "tag": "0.1.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "MovingArcsMenu/Classes/**/*",
    "frameworks": "UIKit",
    "pushed_with_swift_version": "4.0.3"
}

Pin It on Pinterest

Share This