Latest 1.0.1
Homepage https://github.com/tularovbeslan/AlignmentControl
License MIT
Platforms ios 10.0
Authors

AlignmentControl is a component for alignment

Twitter
CI Status
Version
iOS 10.0+
Swift 5
License
Platform

Artboard

Direction

AlignmentDirection
Horizontal AlignmentControl
Vertical AlignmentControl

Mode

AlignmentMode
Left AlignmentControl
Center AlignmentControl
Right AlignmentControl
Top AlignmentControl
Middle AlignmentControl
Bottom AlignmentControl

Animation

AnimationType
None AlignmentControl
Fade AlignmentControl
Translation AlignmentControl
Bounce AlignmentControl

Use

let alignView = AlingmentView(frame: CGRect(x: 0, y: 0, width: 124, height: 50))
alignView.setBackgroundImage(UIImage(named: "group"))
alignView.delegate = self
alignView.dataSource = self
alignView.animation = .Bounce
alignView.activeAligmentModes = [.Left, .Top]
alignView.isPulse = false

you also need to conform to datasource and delegate like in UITableview

public protocol AlingmentViewDelegate: class {
    func didSelectOptionFor(_ mode: AlignmentMode)
}

public protocol AlingmentViewDataSource: class {
    func optionsForAlignment() -> [AlignmentMode]
}

more detail you can see in the example

Example

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

Requirements

iOS 10.0+
Xcode Xcode 9.0+
Swift 5.0

Installation

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

pod 'AlignmentControl'

Author

Beslan Tularov | AlignmentControl @JiromTomson

Mikhail Kupriyanov | AlignmentControl mpkupriyanov

License

MIT License

Copyright (c) 2018 Beslan Tularov

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Latest podspec

{
    "name": "AlignmentControl",
    "version": "1.0.1",
    "summary": "AlignmentControl is a component for alignment",
    "description": "Alignment Control is a component to align top, middle, bottom, left, center, right.",
    "homepage": "https://github.com/tularovbeslan/AlignmentControl",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "[email protected]": "[email protected]"
    },
    "source": {
        "git": "https://github.com/tularovbeslan/AlignmentControl.git",
        "tag": "1.0.1"
    },
    "social_media_url": "https://twitter.com/JiromTomson",
    "swift_version": "5",
    "platforms": {
        "ios": "10.0"
    },
    "source_files": "AlignmentControl/Classes/**/*"
}

Pin It on Pinterest

Share This