All Projects → funzin → StackBarButtonItem

funzin / StackBarButtonItem

Licence: MIT license
🔲 StackBarButtonItem can use BarButtonItem like StackView

Programming Languages

swift
15916 projects
ruby
36898 projects - #4 most used programming language
objective c
16641 projects - #2 most used programming language

Projects that are alternatives of or similar to StackBarButtonItem

Cathay
an iOS project for demonstration of Reactive Programming
Stars: ✭ 21 (-61.82%)
Mutual labels:  rxswift, carthage, rxcocoa
DailyNews
Daily News is a news app with good looking user interface ! Apps architecture is MVVM and used RxSwift for binding.
Stars: ✭ 31 (-43.64%)
Mutual labels:  rxswift, rxcocoa
MovieInfoMVVMiOS
Movie Info app using TMDb API built with MVVM
Stars: ✭ 38 (-30.91%)
Mutual labels:  rxswift, rxcocoa
Bark
Bark is an iOS App which allows you to push customed notifications to your iPhone
Stars: ✭ 2,371 (+4210.91%)
Mutual labels:  rxswift, rxcocoa
Mp3ID3Tagger
🎶🎵A macOS application to edit the ID3 tag of your mp3 files. Developed with RxSwift and RxCocoa. 🎸🎼
Stars: ✭ 17 (-69.09%)
Mutual labels:  rxswift, rxcocoa
GITGET
GitHub의 Contributions를 iOS의 Widget으로 보여주는 App
Stars: ✭ 101 (+83.64%)
Mutual labels:  rxswift, rxcocoa
Iossampleapp
Sample iOS app demonstrating Coordinators, Dependency Injection, MVVM, Binding
Stars: ✭ 510 (+827.27%)
Mutual labels:  rxswift, carthage
Moya-Gloss
Gloss bindings for Moya
Stars: ✭ 37 (-32.73%)
Mutual labels:  rxswift, carthage
RxStudy
RxSwift/RxCocoa框架,MVVM模式编写wanandroid客户端
Stars: ✭ 122 (+121.82%)
Mutual labels:  rxswift, rxcocoa
awesome-demo-app
100% programmatically written in Swift. Clearly demonstrating the RxSwift, RxCocoa, RxRealm & SnapKit.
Stars: ✭ 16 (-70.91%)
Mutual labels:  rxswift, rxcocoa
Eachnavigationbar
A custom navigation bar for each view controller.
Stars: ✭ 314 (+470.91%)
Mutual labels:  carthage, navigationbar
RxCocoa-Texture
RxCocoa Extension Library for Texture.
Stars: ✭ 98 (+78.18%)
Mutual labels:  rxswift, rxcocoa
Rxappstate
RxSwift extensions for UIApplicationDelegate methods to observe changes in your app's state
Stars: ✭ 328 (+496.36%)
Mutual labels:  rxswift, carthage
Rxspritekit
👾 Reactive Extensions for SpriteKit
Stars: ✭ 131 (+138.18%)
Mutual labels:  rxswift, carthage
CLE-Architecture-Tools
A library for making view controller presentation and dismissal more functional.
Stars: ✭ 32 (-41.82%)
Mutual labels:  rxswift, rxcocoa
RxBatteryManager
A Reactive BatteryManager in Swift for iOS
Stars: ✭ 21 (-61.82%)
Mutual labels:  rxswift, rxcocoa
SwiftUIFormValidator
Declarative form validator for SwiftUI.
Stars: ✭ 34 (-38.18%)
Mutual labels:  carthage
SSAppUpdater
SSAppUpdater is an open-source framework that compares the current version of the app with the store version and returns the essential details of it like app URL, new app version number, new release note, etc. So you can either redirect or notify the user to update their app.
Stars: ✭ 58 (+5.45%)
Mutual labels:  carthage
Monotone
An Unsplash Application for iOS.
Stars: ✭ 181 (+229.09%)
Mutual labels:  rxswift
ZVRefreshing
A pure-swift and wieldy refresh component.
Stars: ✭ 29 (-47.27%)
Mutual labels:  carthage

StackBarButtonItem

StackBarButtonItem

Platform Language Carthage Version License

StackBarButtonItem can use BarButtonItem like stackView.

Features

  • NavigationBar margin
  • Spacing between view
  • Reverse view

Support

  • Device: iPad | iPhone
  • Orientation: Portrait | Landscape
  • Multitasking

Requirements

  • Xcode10 or greater
  • iOS9 or greater
  • Swift4.2 or greater

Dependencies

Installation

Carthage

If you’re using Carthage, simply add StackBarButtonItem to your Cartfile:

github "funzin/StackBarButtonItem"

CocoaPods

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

pod 'StackBarButtonItem'

Usage

Correspondence Table

position Default StackBarButtonItem
right navigationItem.setRightBarButtonItems navigationItem.right.setStackBarButtonItems
left navigationItem.setLeftBarButtonItems navigationItem.left.setStackBarButtonItems

Introduction

iOS11 or later

If iOS version is iOS11 or later, you must use autolayout.

import StackBarButtonItem
・
・
・

// use autolayout
let rightButton = UIButton(frame: CGRect(x: 0, y: 0, width: 44, height: 44))
NSLayoutConstraint.activate([
    rightButton.widthAnchor.constraint(equalToConstant: 44),
    rightButton.heightAnchor.constraint(equalToConstant: 44)
])
self.navigationItem.right.setStackBarButtonItems(views: [rightButton])

iOS9 or iOS10

If iOS version is iOS9 or iOS10, you must configure frame.

import StackBarButtonItem
・
・
・

// configure frame
let rightButton = UIButton(frame: CGRect(x: 0, y: 0, width: 44, height: 44))
self.navigationItem.right.setStackBarButtonItems(views: [rightButton])

Margin

// e.g. set margin to 10
self.navigationItem.right.setStackBarButtonItems(views: [rightButton], margin: 10)

Example

Margin ScreenShot
margin == 0
margin == 10

Spacing

// e.g. set spacing to 10
self.navigationItem.right.setStackBarButtonItems(views: [rightButton1, rightButton2], spacing: 10)

Example

Spacing ScreenShot
spacing == 0
spacing == 10

Reverse

// e.g. set reversed to true
self.navigationItem.right.setStackBarButtonItems(views: [rightButton1, rightButton2], reversed: true)

Example

Reverse ScreenShot
reversed == false
reversed == true

Demo

If you are interested in StackBarButtonItem, please check demo after carthage update

Author

funzin, [email protected]

License

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].