Latest 6.2.0
Homepage https://github.com/NathanE73/Blackboard
License MIT
Platforms osx , ios , tvos , watchos
Authors

Blackboard: Another iOS Storyboard Manager

[Version]()
License
Platform
Swift
Sponsor

Blackboard is an iOS Storyboard and Asset Manager written in Swift.

Xcode Projects

The ExampleApp project uses Blackboard.
The StandardApp project is the same as the ExampleApp project, except that it does not use Blackboard. The is provided so you can see the difference between using and not using Blackboard.

Requirements

  • iOS 10.0+
  • Xcode 10.0+

Installation

Using CocoaPods:

Simply add the following line to your Podfile:

pod 'Blackboard'

This will download the Blackboard binaries and dependencies in Pods/ during your next
pod install execution and will allow you to invoke it via ${PODS_ROOT}/Blackboard/blackboard
in your Script Build Phases.

This is the recommended way to install a specific version of Blackboard since it supports
installing a pinned version rather than simply the latest.

Note that this will add the Blackboard binaries, its dependencies’ binaries and the Swift binary
library distribution to the Pods/ directory, so checking in this directory to SCM such as
git is discouraged.

Xcode

Integrate Blackboard into an Xcode scheme to get warnings and errors displayed
in the IDE. Just add a new "Run Script Phase" with:

if which "${PODS_ROOT}/Blackboard/blackboard" >/dev/null; then
  "${PODS_ROOT}/Blackboard/blackboard" "ExampleApp/Resources/" "ExampleApp/Source/Generated/"
else
  echo "warning: blackboard not installed, download from https://github.com/NathanE73/Blackboard"
fi

Storyboard Usage

UIStoryboard

Instantiate Navigation Controller From Storyboard

@IBAction func presentOpenAccount() {
    let navigationController = OpenAccountViewController.instantiateNavigationControllerFromStoryboard { openAccountViewController in
        openAccountViewController.path = "Instantiate Navigation Controller"
    }
    present(navigationController, animated: true)
}

Instantiate View Controller From Storyboard

@IBAction func presentOpenAccount() {
    let openAccountViewController = OpenAccountViewController.instantiateFromStoryboard()
    openAccountViewController.path = "Instantiate View Controller"

    let navigationController = UINavigationController(rootViewController: openAccountViewController)
    present(navigationController, animated: true)
}

UIStoryboardSegue

Perform Segue

override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
    performPresentOpenAccountSegue { openAccountViewController in
        openAccountViewController.path = "Perform Segue"
    }
}

Prepare Segue

func prepareForPresentPhotoSegue(_ photoViewController: PhotoViewController) {
    photoViewController.viewModel = PhotoViewModel.examples.first
}

Should Perform Segue

func shouldPerformPresentPhotoSegue() -> Bool {
    return PhotoViewModel.examples.first != nil
}

UITableViewCell

Dequeue Cell

override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
    let accountViewModel = accountViewModels[indexPath.row]
    return dequeueAccountCell(from: tableView, for: indexPath) { cell in
        cell.nameLabel.text = accountViewModel.name
        cell.balanceLabel.text = accountViewModel.balance
    }
}

UICollectionViewCell

Dequeue Cell

override func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
    let photoViewModel = photoViewModels[indexPath.item]
    return dequeuePhotoCell(from: collectionView, for: indexPath) { cell in
        cell.imageView.image = photoViewModel.image
    }
}

Asset Usage

UIColor

Background Color

view.backgroundColor = .charcoal

Authors

License

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

Latest podspec

{
    "name": "Blackboard",
    "version": "6.2.0",
    "summary": "An iOS Storyboard and Asset Manager",
    "homepage": "https://github.com/NathanE73/Blackboard",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Nathan Walczak": "[email protected]"
    },
    "source": {
        "http": "https://github.com/NathanE73/Blackboard/releases/download/6.2.0/portable-blackboard.zip"
    },
    "preserve_paths": "*",
    "exclude_files": "**/file.zip",
    "platforms": {
        "osx": null,
        "ios": null,
        "tvos": null,
        "watchos": null
    }
}

Pin It on Pinterest

Share This