androoo / CustomTabBar

An iOS component for a custom tab bar

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CustomTabBar

Latest release GitHub license Carthage compatible Swift Package Manager compatible

An iOS component for a custom tab bar

  1. Requirements
  2. Usage
  3. Integration

Requirements

  • iOS 9.0+
  • Xcode 7

Usage

Import CustomTabBar

Integration

Carthage

Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.

You can install Carthage with Homebrew using the following command:

$ brew update
$ brew install carthage

To integrate CustomTabBar into your Xcode project using Carthage, specify it in your Cartfile:

github "benjaminsnorris/CustomTabBar"

Run carthage update to build the framework and drag the built CustomTabBar.framework into your Xcode project.

Swift Package Manager

You can use The Swift Package Manager to install CustomTabBar by adding the proper description to your Package.swift file:

import PackageDescription

let package = Package(
    name: "YOUR_PACKAGE_NAME",
    targets: [],
    dependencies: [
        .Package(url: "https://github.com/benjaminsnorris/CustomTabBar.git", majorVersion: 1)
    ]
)

Note that the Swift Package Manager is still in early design and development. For more information check out its GitHub Page

Git Submodules

  • If you don't already have a .xcworkspace for your project, create one. (Here's how)

  • Open up Terminal, cd into your top-level project directory, and run the following command "if" your project is not initialized as a git repository:

$ git init
  • Add CustomTabBar as a git submodule by running the following command:
$ git submodule add https://github.com/benjaminsnorris/CustomTabBar.git Vendor/CustomTabBar
  • Open the new CustomTabBar folder, and drag the CustomTabBar.xcodeproj into the Project Navigator of your application's Xcode workspace.

    It should not be nested underneath your application's blue project icon. Whether it is above or below your application's project does not matter.

  • Select CustomTabBar.xcodeproj in the Project Navigator and verify the deployment target matches that of your application target.

  • Next, select your application project in the Project Navigator (blue project icon) to navigate to the target configuration window and select the application target under the "Targets" heading in the sidebar.

  • In the tab bar at the top of that window, open the "General" panel.

  • Click on the + button under the "Linked Frameworks and Libraries" section.

  • Select CustomTabBar.framework inside the Workspace folder.

  • Click on the + button under the "Embedded Binaries" section.

  • Select CustomTabBar.framework nested inside your project.

  • An extra copy of CustomTabBar.framework will show up in "Linked Frameworks and Libraries". Delete one of them (it doesn't matter which one).

  • And that's it!

About

An iOS component for a custom tab bar

License:MIT License


Languages

Language:Swift 97.4%Language:Objective-C 2.6%