Latest 0.9.0
Homepage https://github.com/Skyscanner/backpack-ios
License Apache-2.0
Platforms ios 9.0, requires ARC
Frameworks UIKit, Foundation
Authors

CI Status
Version
License
Platform
Greenkeeper badge

Installation

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

pod 'Backpack'

This will install all of Backpack. We use subspecs to subdivide the library so you might want to only install specific subspecs instead.

Subspecs

Backpack/Color

Backpack/Color contains our color palette contained in a single class BPKColor. Add Backpack/Color to your Podfile or podspec and then use it as follows.

#import <Backpack/Color.h>

[BPKColor blue500];
[BPKColor gray900];

Backpack/Font

Backpack/Font contains the Backpack typography styles in a single class BPKFont. Add Backpack/Font to your Podfile or podspec and then use it as follows.

#import <Backpack/Font.h>

[BPKFont textXs];
[BPKFont textXsEmphasized];

We support a variety of sizes and an emphasized style for each.

Backpack/Spacing

Backpack/Spacing contains the Backpack spacing values as CGFloat constants. Add Backpack/Spacing to your Podfile or podspec and then use it as follows.

#import <Backpack/Spacing.h>

CGFloat myAppSpacingSmall = BPKSpacingSm;
CGFloat myAppSpacingLarge = BPKSpacingLg;

Backpack/Radii

Backpack/Radii contains the Backpack radii values as CGFloat constants. Add Backpack/Radii to your Podfile or podspec and then use it as follows.

#import <Backpack/Radii.h>

CGFloat myAppBorderRadiusSmall = BPKBorderRadiusSm;
CGFloat myAppBorderRadiusLarge = BPKBorderRadiusPill;

Backpack/Shadow

Backpack/Shadow contains the Backpack shadow definitions in the class BPKShadow. Add Backpack/Shadow to your Podfile or podspec and then use it as follows.

#import <Backpack/Shadow.h>

BPKShadow *shadow = [BPKShadow shadowSm];
// BPKShadow *shadowLg = [BPKShadow shadowLg];
// BPKShadow *shadowXl = [BPKShadow shadowXl];

[shadow applyToLayer:myView.layer];

Backpack/Gradient

Backpack/Gradient contains the Backpack gradient definitions in the class BPKGradient. BPKGradient has the two properties:

  • colors of type NSArray<UIColor *> *
  • stops encoded as CGPoints with components in the range 0-1 encoded as NSValue * in NSArray<NSValue *> *

Add Backpack/Gradient to your Podfile or podspec and then use it as follows.

#import <Backpack/Gradient.h>

BPKGradient *gradientDefault = [BPKGradient gradient];
BPKGradient *gradientTopRight =  [BPKGradient primaryWithDirection:BPKGradientDirectionTopRight];

Contributing to Backpack

Please see the Contributing guide for instructions on contributing to this project.

License

Backpack is available under the Apache 2.0 license. See the LICENSE file for more info.

Latest podspec

{
    "name": "Backpack",
    "version": "0.9.0",
    "summary": "Skyscanner's Design System Backpack for iOS",
    "description": "The Skyscanner Design System, Backpack, for iOS apps",
    "homepage": "https://github.com/Skyscanner/backpack-ios",
    "license": {
        "type": "Apache-2.0",
        "file": "LICENSE"
    },
    "authors": {
        "Backpack Design System": "[email protected]"
    },
    "source": {
        "git": "https://github.com/Skyscanner/backpack-ios.git",
        "tag": "0.9.0"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source_files": "Backpack/Classes/Backpack.h",
    "public_header_files": "Backpack/Classes/Backpack.h",
    "frameworks": [
        "UIKit",
        "Foundation"
    ],
    "requires_arc": true,
    "subspecs": [
        {
            "name": "Color",
            "source_files": "Backpack/Classes/Color/**/*.{h,m}",
            "public_header_files": "Backpack/Classes/Color/**/*.h"
        },
        {
            "name": "Font",
            "source_files": "Backpack/Classes/Font/**/*.{h,m}",
            "public_header_files": "Backpack/Classes/Font/**/*.h"
        },
        {
            "name": "Spacing",
            "source_files": "Backpack/Classes/Spacing/**/*.{h,m}",
            "public_header_files": "Backpack/Classes/Spacing/**/*.h"
        },
        {
            "name": "Radii",
            "source_files": "Backpack/Classes/Radii/**/*.{h,m}",
            "public_header_files": "Backpack/Classes/Radii/**/*.h"
        },
        {
            "name": "Shadow",
            "source_files": "Backpack/Classes/Shadow/**/*.{h,m}",
            "public_header_files": "Backpack/Classes/Shadow/**/*.h"
        },
        {
            "name": "Gradient",
            "source_files": "Backpack/Classes/Gradient/**/*.{h,m}",
            "public_header_files": "Backpack/Classes/Gradient/**/*.h",
            "dependencies": {
                "Backpack/Color": []
            }
        },
        {
            "name": "Badge",
            "source_files": "Backpack/Classes/Badge/**/*.{h,m}",
            "public_header_files": "Backpack/Classes/Badge/**/*.h",
            "dependencies": {
                "Backpack/Color": [],
                "Backpack/Spacing": [],
                "Backpack/Radii": [],
                "Backpack/Font": []
            }
        },
        {
            "name": "Label",
            "source_files": "Backpack/Classes/Label/**/*.{h,m}",
            "public_header_files": "Backpack/Classes/Label/**/*.h",
            "dependencies": {
                "Backpack/Color": [],
                "Backpack/Font": []
            }
        },
        {
            "name": "Panel",
            "source_files": "Backpack/Classes/Panel/**/*.{h,m}",
            "public_header_files": "Backpack/Classes/Panel/**/*.h",
            "dependencies": {
                "Backpack/Color": [],
                "Backpack/Spacing": [],
                "Backpack/Radii": []
            }
        }
    ]
}

Pin It on Pinterest

Share This