Latest 0.1.2
Homepage https://github.com/VitaliiDeveloper/VLUniversalControl
License MIT
Platforms ios 11.0
Frameworks UIKit
Authors

Version of framework
Version of pod
Platform
Licence

VLUniversalControl is a Swift framework for easily adding paging.

Animation
Animation
Animation
Animation

For more exaples of views you can open Sample/ExapleView and choose them. Everythis what you need to do it’s change in ViewController in loadView method, name of View from Sample/ExapleView.

Installation 📲

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

    pod 'VLUniversalControl'

Functionality

  • [ ] Indicate select item
  • [ ] Indicate deselect item
  • [ ] Dynamic update style
  • [x] Only label for item
  • [x] Only image for item
  • [x] Label to image item
  • [x] Image to label item
  • [x] Image and label by horizontal item
  • [x] Label and image by horizontal item
  • [x] Dynamic length of item
  • [x] Static length of item
  • [x] Dynamic length of control
  • [x] Static length of control
  • [x] Length of item by text width
  • [x] Custom length of item
  • [x] Support adding custom object to item
  • [x] Support vertical control

Usage

import VLUniversalControl
self.universalControlView = VLUniversalControlView()
//give your frame size for VLUniversalControlView
//or add constraints
//item height will equel to (VLUniversalControlView *)universalControlView.frame.size.height
self.view.addSubview(self.universalControlView) 

// Each as you add new attributes control will be update
universalControlView.items.set(items: [standartViewAttribute,...,standartViewAttribute])
//To append item
universalControlView.items.append(item:standartViewAttribute)

Available item attributes:

// Only for title and image
let standartViewAttribute = VLStandartViewCellAttribute()
    // If alignment only image it will be non creating
    standartView.title = "Your Title" 
    // If alignment only title it will be non creating
    standartView.imageName = "Your Image" 
    standartView.alignment = .onlyImage

// Only for adding inside container `yourview`
let containerViewAttribute = VLContainerViewCellAttribute()
      containerView.view = yourView

VLUniversalControlView already have a lot different style properties.
You can add style to item or for items.

For item

let standartView = VLStandartViewCellAttribute()
    // only for cell style
    standartView.style = standartViewStyle 

For items

var style = VLCollectionViewStyle()
    style.backgroundColor = UIColor.brown
    style.itemsBackgroundColor = UIColor.red
    style.itemWidth = 175
    style.spacingBetweenItems = 5

    style.itemsBorderColor = UIColor.green
    style.itemBorderRadius = ([.layerMaxXMaxYCorner], 5)
    style.itemsBorderSide = [.top, .bottom]
    style.itemsBorderWidth = 10
    style.itemsBorderColor = .green

    self.universalControlView.optionsUniversalControl.style = style

Latest podspec

{
    "name": "VLUniversalControl",
    "version": "0.1.2",
    "summary": "VLUniversalControl is a Swift framework for easily adding paging.",
    "swift_version": "5.0",
    "platforms": {
        "ios": "11.0"
    },
    "homepage": "https://github.com/VitaliiDeveloper/VLUniversalControl",
    "license": "MIT",
    "authors": {
        "Vitalii Lavreniuk": "[email protected]"
    },
    "social_media_url": "https://twitter.com/vit_lavreniuk",
    "frameworks": "UIKit",
    "source": {
        "git": "https://github.com/VitaliiDeveloper/VLUniversalControl.git",
        "tag": "v0.1.2"
    },
    "source_files": "VLUniversalControl/**/*",
    "exclude_files": "VLUniversalControl/**/*.plist",
    "description": "## Usagenn```swiftnimport VLUniversalControln```nn```swiftnself.universalControlView = VLUniversalControlView()n//give your frame size for VLUniversalControlViewn//or add constraintsn//item height will equel to (VLUniversalControlView *)universalControlView.frame.size.heightnself.view.addSubview(self.universalControlView) nn// Each as you add new attributes control will be updatenuniversalControlView.items.set(items: [standartViewAttribute,...,standartViewAttribute])n//To append itemnuniversalControlView.items.append(item:standartViewAttribute)n```nnAvailable item attributes:n```swiftn// Only for title and imagenlet standartViewAttribute = VLStandartViewCellAttribute()n    // If alignment only image it will be non creatingn    standartView.title = "Your Title" n    // If alignment only title it will be non creatingn    standartView.imageName = "Your Image" n    standartView.alignment = .onlyImagenn// Only for adding inside container `yourview`nlet containerViewAttribute = VLContainerViewCellAttribute()n      containerView.view = yourViewn```nnVLUniversalControlView already have a lot different style properties.nYou can add style to item or for items.nn### For itemn```swiftnlet standartView = VLStandartViewCellAttribute()n    // only for cell stylen    standartView.style = standartViewStyle n```nn### For itemsn```swiftnvar style = VLCollectionViewStyle()n    style.backgroundColor = UIColor.brownn    style.itemsBackgroundColor = UIColor.redn    style.itemWidth = 175n    style.spacingBetweenItems = 5n    n    style.itemsBorderColor = UIColor.greenn    style.itemBorderRadius = ([.layerMaxXMaxYCorner], 5)n    style.itemsBorderSide = [.top, .bottom]n    style.itemsBorderWidth = 10n    style.itemsBorderColor = .greenn    n    self.universalControlView.optionsUniversalControl.style = stylen```"
}

Pin It on Pinterest

Share This