Latest 0.0.7
Homepage https://github.com/apparition47/BreadCrumbControl
License BSD
Platforms ios 8.0
Authors

Carthage compatible [CocoaPods]()

BreadCrumb Control for iOS written in Swift.

animatedsample

sample

The properties of "BreadCrumb" are fully accessible for the developer: color, animation, etc.
This control is provided with a sample application that lets you change the properties of the control in real-time.

Compatibility

This control is compatible with iOS 8. Swift 3.0 compatible.

Installation in Xcode project

It is a very easy control to include in your project.

Manually

Add to your iOS project: BreadCrumb.swift, CustomButton.swift, BreadCrumbs.xcassets.

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

To integrate this into your Xcode project using CocoaPods, specify it in your Podfile:

platform :ios, '8.0'
use_frameworks!

target '<Your Target Name>' do
    pod 'BreadCrumbControl'
end

Carthage

BreadCrumbControl is Carthage compatible.
Add the following into your Cartfile, then run carthage update.

github "apparition47/BreadCrumbControl"

Usage

In order to use BreadCrumb control, you can instantiate it programmatically, or create a custom view in Interface Builder and assign it to an ivar of your app. Once you have an instance, you can use the control properties to configure it.
See ViewController.swift for detail code.

import BreadCrumbControl // if using CocoaPods or Carthage 

class ViewController: UIViewController {
    @IBOutlet weak var breadcrumbControl: CBreadcrumbControl!
    override func viewDidLoad() {
        self.breadcrumbView.delegate = self

        self.breadcrumbView.buttonFont = UIFont.boldSystemFont(ofSize: 16)
        self.breadcrumbView.style = .gradientFlatStyle
        self.breadcrumbView.itemsBreadCrumb = ["Config", "Alarm"]
    }
}

extension ViewController: BreadCrumbControlDelegate {
    func didTouchItem(index: Int, item: String) {
        let alertView = UIAlertView();
        alertView.addButton(withTitle: "OK")
        alertView.title = "Item touched"
        alertView.message = "(item) (index= (index))"
        alertView.show()
    }

    func didTouchRootButton() {
        let alertView = UIAlertView();
        alertView.addButton(withTitle: "OK")
        alertView.title = "Root button touched"
        alertView.show()
    }
}

Screenshots

sampleapplication

Credits

License

BSD

Latest podspec

{
    "name": "BreadCrumbControl",
    "version": "0.0.7",
    "license": "BSD",
    "summary": "BreadCrumb Control (Swift)",
    "homepage": "https://github.com/apparition47/BreadCrumbControl",
    "authors": {
        "Philippe Kersalu00e9": "[email protected]"
    },
    "source": {
        "git": "https://github.com/apparition47/BreadCrumbControl.git",
        "tag": "0.0.7"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "BreadCrumb Control/BreadCrumb Control/*.swift",
    "resources": "BreadCrumb Control/BreadCrumb.{xcassets}",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This