Latest 1.0.0
Homepage https://github.com/steve228uk/SRAdaptiveSpaceItem
License MIT
Platforms osx 10.10
Authors

A Swift NSToolbarItem subclass which creates a space that will centre the next toolbar item.

This project is a direct translation of TAAdaptiveSpaceItem

Usage

  1. Add an Image Toolbar Item to your toolbar
  2. Set the class of the Image Toolbar Item to SRAdaptiveSpaceItem
  3. Place the SRAdaptiveSpaceItem directly before the item you wish to centre

You only need 1 SRAdaptiveSpaceItem per toolbar. Items after the centred item can be positioned using a flexible space with no issues.

Installation

Either manually copy the SRAdaptiveSpaceItem.swift file to your project or install via CocoaPods

pod 'SRAdaptiveSpaceItem'

Screenshots

Screenshot 1
Screenshot 2

Latest podspec

{
    "name": "SRAdaptiveSpaceItem",
    "version": "1.0.0",
    "summary": "A Swift NSToolbarItem subclass which creates a space that will center the next toolbar item",
    "description": "A Swift NSToolbarItem subclass which creates a space that will center the next toolbar item.nnThis is a direct translation of TAAdaptiveSpaceItem.",
    "homepage": "https://github.com/steve228uk/SRAdaptiveSpaceItem",
    "license": "MIT",
    "authors": {
        "Stephen Radford": "[email protected]"
    },
    "source": {
        "git": "https://github.com/steve228uk/SRAdaptiveSpaceItem.git",
        "tag": "1.0.0"
    },
    "social_media_url": "https://twitter.com/steve228uk",
    "platforms": {
        "osx": "10.10"
    },
    "source_files": "SRAdaptiveSpaceItem.swift"
}

Pin It on Pinterest

Share This