Latest 0.3.3
Homepage https://github.com/grifas/AGNavigationBarShape
License MIT
Platforms ios 8.0
Authors

CI Status
Version
License
Platform
Language
[Download]()
[CocoaPods]()

iOS Navigation Bar with customs shapes (Zigzag, Wave and Square).

sample

To run the example project, clone the repo, and run pod install from the Example directory first.

Installation

CocoaPods

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

pod "AGNavigationBarShape"

Manually

Add the AGNavigationBarShape.swift file to your project.

Usage

Setup

Add import AGNavigationBarShape in your file

In your app delegate:

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Override point for customization after application launch.

 let rootViewController = UIStoryboard.init(name: "Main", bundle: nil).instantiateInitialViewController()
 let navController = UINavigationController(navigationBarClass: AGNavigationBarShape.self, toolbarClass: nil)

 (navController.navigationBar as? AGNavigationBarShape)?.shapeMode = ShapeMode.wave.rawValue
 (navController.navigationBar as? AGNavigationBarShape)?.color = UIColor.purple
 (navController.navigationBar as? AGNavigationBarShape)?.cycles = 10
 (navController.navigationBar as? AGNavigationBarShape)?.heightShape = 15

 navController.viewControllers = [rootViewController!]

 window?.rootViewController = navController
 window?.makeKeyWindow()
 return true
}

Storyboard Support

  1. Add AGNavigationBarShape Class and Module to UINavigationController’s navigationBar in Identity Inspector

sample

  1. If you want to custom it, set options in the Attributes Inspector tab

sample

Features

  • Choose shape mode (0: Zigzag, 1: Wave, 2: Square) (Zigzag by default)
  • Custom number of cycle (9 by default)
  • Custom background color (orange by default)
  • Custom height of the shape (10 by default)

Author

Aurelien Grifasi, [email protected]

License

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

Latest podspec

{
    "name": "AGNavigationBarShape",
    "version": "0.3.3",
    "summary": "AGNavigationBarShape is a custom navigation bar with severals shapes.",
    "description": "AGNavigationBarShape allows you to custom the navigation bar with severals shapes availables. The height of the shape is also customizable.",
    "homepage": "https://github.com/grifas/AGNavigationBarShape",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Aurelien Grifasi": "[email protected]"
    },
    "source": {
        "git": "https://github.com/grifas/AGNavigationBarShape.git",
        "tag": "0.3.3"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "AGNavigationBarShape/Classes/**/*",
    "xcconfig": {
        "SWIFT_VERSION": "3.0"
    },
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This