Skip to content
BreadCrumb Control for iOS (Swift)
Swift Ruby
Branch: master
Clone or download
Pull request Compare This branch is 64 commits ahead of PhilKers:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
BreadCrumb Control.xcodeproj
BreadCrumb Control
BreadCrumb ControlTests
BreadCrumb ControlUITests
BreadCrumbControl-iOS
.gitignore
BreadCrumbControl.podspec
LICENSE
README.md

README.md

BreadCrumbControl

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 10. Swift 5 compatible. Use 0.1.1 for iOS 8/Swift 4 support.

Installation in Xcode 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, '10.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

You can’t perform that action at this time.