All Projects → 1amageek → Toolbar

1amageek / Toolbar

Licence: mit
Awesome autolayout Toolbar. Toolbar is a library for iOS. You can easily create chat InputBar.

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Toolbar

Ribbon
🎀 A simple cross-platform toolbar/custom input accessory view library for iOS & macOS.
Stars: ✭ 273 (-40.39%)
Mutual labels:  toolbar
Easyswiftlayout
Lightweight Swift framework for Apple's Auto-Layout
Stars: ✭ 345 (-24.67%)
Mutual labels:  autolayout
Uicollectionview Layouts Kit
📐 A set of custom layouts for UICollectionView with examples [Swift 5.3, iOS 12].
Stars: ✭ 410 (-10.48%)
Mutual labels:  autolayout
Waterfall Toolbar
Stars: ✭ 282 (-38.43%)
Mutual labels:  toolbar
Layoutframeworkbenchmark
Benchmark the performances of various Swift layout frameworks (autolayout, UIStackView, PinLayout, LayoutKit, FlexLayout, Yoga, ...)
Stars: ✭ 316 (-31%)
Mutual labels:  autolayout
Uitableviewdynamiclayoutcacheheight
🖖高性能的自动计算采用 Autolayout 布局的 UITableViewCell 和 UITableViewHeaderFooterView 的高度,内部自动管理高度缓存。
Stars: ✭ 360 (-21.4%)
Mutual labels:  autolayout
developerbar
Developer Bar (inspired on Kohana Debug Toolbar) for Kohana 3+ PHP
Stars: ✭ 16 (-96.51%)
Mutual labels:  toolbar
Prophiler
PHP Profiler & Developer Toolbar (built for Phalcon)
Stars: ✭ 445 (-2.84%)
Mutual labels:  toolbar
Snapkit
A Swift Autolayout DSL for iOS & OS X
Stars: ✭ 18,091 (+3850%)
Mutual labels:  autolayout
Uiwidget
一个集成TabLayout、UIAlertDialog、UIActionSheetDialog、UIProgressDialog、TitleBarView(自带沉浸式标题栏)、CollapsingTitleBarLayout、RadiusView(圆角及状态背景设置View解放shape文件)、KeyboardHelper(软键盘控制及遮挡控制类)、StatusViewHelper(状态栏沉浸帮助类)、NavigationViewHelper(导航栏沉浸式帮助类)、AlphaViewHelper(View透明度控制帮助类) 等项目常用UI库
Stars: ✭ 400 (-12.66%)
Mutual labels:  toolbar
Stevia
🍃 Concise Autolayout code
Stars: ✭ 3,182 (+594.76%)
Mutual labels:  autolayout
Misterfusion
MisterFusion is Swift DSL for AutoLayout. It is the extremely clear, but concise syntax, in addition, can be used in both Swift and Objective-C. Support Safe Area and Size Class.
Stars: ✭ 314 (-31.44%)
Mutual labels:  autolayout
Autoinch
优雅的iPhone全尺寸/等比例精准适配工具
Stars: ✭ 395 (-13.76%)
Mutual labels:  autolayout
Swiftuix
Extensions and additions to the standard SwiftUI library.
Stars: ✭ 4,087 (+792.36%)
Mutual labels:  toolbar
Mylinearlayout
MyLayout is a powerful iOS UI framework implemented by Objective-C. It integrates the functions with Android Layout,iOS AutoLayout,SizeClass, HTML CSS float and flexbox and bootstrap. So you can use LinearLayout,RelativeLayout,FrameLayout,TableLayout,FlowLayout,FloatLayout,PathLayout,GridLayout,LayoutSizeClass to build your App 自动布局 UIView UITab…
Stars: ✭ 4,152 (+806.55%)
Mutual labels:  autolayout
Align
Intuitive and powerful Auto Layout library
Stars: ✭ 261 (-43.01%)
Mutual labels:  autolayout
Extended text
A powerful extended official text for Flutter, which supports Speical Text(Image,@somebody), Custom Background, Custom overFlow, Text Selection.
Stars: ✭ 345 (-24.67%)
Mutual labels:  toolbar
Immersivedetailsample
A sample application show how to realize immersive parallax effect header like Google Play Store
Stars: ✭ 457 (-0.22%)
Mutual labels:  toolbar
Easyanchor
⚓️ Declarative, extensible, powerful Auto Layout
Stars: ✭ 432 (-5.68%)
Mutual labels:  autolayout
Toolbarpanel
Toolbar that can be slided down to show a panel
Stars: ✭ 397 (-13.32%)
Mutual labels:  toolbar

Toolbar

Version Platform Downloads

This toolbar is made with Autolayout. It works more interactively than UIToolbar.

Please Donate

Slow Animations Debug mode

If you want a Toolbar that works with the keyboard, please see here. https://github.com/1amageek/OnTheKeyboard

Installation

CocoaPods

  • Inset pod 'Toolbar' to your Podfile.
  • Run pod install

Usage

Height and Width of the Toolbar are determined automatically. Do not set frame.

Initialization.

let toolbar: Toolbar = Toolbar()
let toolbar: Toolbar = Toolbar()

lazy var camera: ToolbarItem = {
    let item: ToolbarItem = ToolbarItem(image: #imageLiteral(resourceName: "camera"), target: nil, action: nil)
    return item
}()

lazy var microphone: ToolbarItem = {
    let item: ToolbarItem = ToolbarItem(image: #imageLiteral(resourceName: "microphone"), target: nil, action: nil)
    return item
}()

lazy var picture: ToolbarItem = {
    let item: ToolbarItem = ToolbarItem(image: #imageLiteral(resourceName: "picture"), target: nil, action: nil)
    return item
}()

var toolbarBottomConstraint: NSLayoutConstraint?

override func loadView() {
    super.loadView()
    self.view.addSubview(toolbar)
    self.toolbarBottomConstraint = self.toolbar.bottomAnchor.constraint(equalTo: self.view.bottomAnchor, constant: 0)
    self.toolbarBottomConstraint?.isActive = true
}

override func viewDidLoad() {
    super.viewDidLoad()
    self.toolbar.maximumHeight = 100
    self.toolbar.setItems([self.camera, self.picture, self.microphone], animated: false)
}

Hide items

func hideItems() {
    self.camera.setHidden(false, animated: true)
    self.microphone.setHidden(false, animated: true)
    self.picture.setHidden(false, animated: true)
}

Stretchable TextView

You can control the height by setting maximumHeight.

// ViewController

override func viewDidLoad() {
    super.viewDidLoad()
    self.toolbar.maximumHeight = 100
    let textView: UITextView = UITextView(frame: .zero)
    textView.delegate = self
    textView.font = UIFont.systemFont(ofSize: 14)
    self.toolbar.setItems([textView], animated: false)
}

// UITextViewDelegate
func textViewDidChange(_ textView: UITextView) {
    let size: CGSize = textView.sizeThatFits(textView.bounds.size)
    if let constraint: NSLayoutConstraint = self.constraint {
        textView.removeConstraint(constraint)
    }
    self.constraint = textView.heightAnchor.constraint(equalToConstant: size.height)
    self.constraint?.priority = UILayoutPriorityDefaultHigh
    self.constraint?.isActive = true
}

var constraint: NSLayoutConstraint?

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].