Latest 1.0.0
Homepage https://github.com/Geektree0101/UnlimitBar
License MIT
Platforms ios 9.0
Authors

CI Status
Version
License
Platform

UnlimitBar
UnlimitBar

Feel the freedom from UINavigationBar Holy Shit Restrictions

[Guideline]

  1. import UnlimitBar
  2. create custom navigation bar as UIView
  3. call applyNavigationBar method
    • If you want animate navigationBar then use transitionAnimateion method

Example

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

  1. ScrollView case

    
    // Create Custom UIView for NavigationBar
    let catFeedNavBar = CatFeedNavigationBar.loadView()
    
    // apply custom navigation bar
    self.applyNavigationBar(catFeedNavBar, // custom navbar
                            expectHeight: CatFeedNavigationBar.Const.height, // navbar default height
                            backButton: nil, // back button auto hide
                            statusBarColor: UIColor.white, // status bar color
                            relatedScrollView: tableView) // tableView -> autoresize content top inset
transition animation
```swift
    func scrollViewDidScroll(_ scrollView: UIScrollView) {
        self.transitionAnimateion(scrollView, type: .autohide) // auto show/hide
        // if you want control show/hide navbar base scroll offset
        self.transitionAnimateion(scrollView, type: .transition(SHOW_OFFSET, HIDE_OFFSET)) 
        self.transitionAnimateion(scrollView, type: .reset) // reset animation
    }
  1. Single ViewController
    • first you need uppermost top constraint of view on view controller
      
      @IBOutlet weak var topConstraint: NSLayoutConstraint! 
      or
      let topConstraint: NSLayoutConstraint ...
- insert constraint parameter on applyNavigationBar method
```swift 
    let catNavigationBar = CatSingleNavigationBar.loadView()

    self.applyNavigationBar(catNavigationBar, // custom bar
                            expectHeight: CatSingleNavigationBar.Const.navBarHeight, // bar height
                            backButton: catNavigationBar.backButton, // back button
                            statusBarColor: UIColor.white, // color
                            subViewTopConstraint: self.topConstraint) // CONSTRAINT

TODO(milestone)

  • Fix some method name spelling
  • Scroll offset base navigationBar animation
  • Support TabBar
  • Update constraint after rotate orientation

Installation

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

pod 'UnlimitBar'

Author

Geektree0101, [email protected]

License

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

Latest podspec

{
    "name": "UnlimitBar",
    "version": "1.0.0",
    "summary": "I HATE UINavigationBar attribute restriction!",
    "description": "UINavigationBar has tooo many restriction, Lets make custom navigationBar as UIView!",
    "homepage": "https://github.com/Geektree0101/UnlimitBar",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Geektree0101": "[email protected]"
    },
    "source": {
        "git": "https://github.com/Geektree0101/UnlimitBar.git",
        "tag": "1.0.0"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source_files": "UnlimitBar/Classes/**/*",
    "pushed_with_swift_version": "3.2"
}

Pin It on Pinterest

Share This