All Projects → nathantannar4 → Inputbaraccessoryview

nathantannar4 / Inputbaraccessoryview

Licence: mit
A simple and easily customizable InputAccessoryView for making powerful input bars with autocomplete and attachments

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Inputbaraccessoryview

Qooxdoo
qooxdoo - Universal JavaScript Framework
Stars: ✭ 684 (-15.24%)
Mutual labels:  uikit
Hyperform
Capture form validation back from the browser
Stars: ✭ 729 (-9.67%)
Mutual labels:  input
Viewanimator
ViewAnimator brings your UI to life with just one line
Stars: ✭ 6,592 (+716.85%)
Mutual labels:  uikit
Input Overlay
Show keyboard, gamepad and mouse input on stream
Stars: ✭ 684 (-15.24%)
Mutual labels:  input
Color Picker For Ios
Colorful: iOS color picker built with Swift.
Stars: ✭ 709 (-12.14%)
Mutual labels:  uikit
Alignedcollectionviewflowlayout
A collection view layout that gives you control over the horizontal and vertical alignment of the cells.
Stars: ✭ 751 (-6.94%)
Mutual labels:  uikit
Material Kit
Free and Open Source UI Kit for Bootstrap 4, React, Vue.js, React Native and Sketch based on Google's Material Design
Stars: ✭ 5,672 (+602.85%)
Mutual labels:  uikit
Overlaycontainer
Non-intrusive iOS UI library to implement overlay based interfaces
Stars: ✭ 777 (-3.72%)
Mutual labels:  uikit
Flaggy
Idiomatic Go input parsing with subcommands, positional values, and flags at any position. No required project or package layout and no external dependencies.
Stars: ✭ 711 (-11.9%)
Mutual labels:  input
Notie
🔔 a clean and simple notification, input, and selection suite for javascript, with no dependencies
Stars: ✭ 6,170 (+664.56%)
Mutual labels:  input
Material Ui Chip Input
A chip input field using Material-UI.
Stars: ✭ 691 (-14.37%)
Mutual labels:  input
Vue Ctk Date Time Picker
VueJS component to select dates & time, including a range mode
Stars: ✭ 707 (-12.39%)
Mutual labels:  input
Drawerkit
DrawerKit lets an UIViewController modally present another UIViewController in a manner similar to the way Apple's Maps app works.
Stars: ✭ 755 (-6.44%)
Mutual labels:  uikit
Cardslayout
⭐️ Custom card-designed CollectionView layout
Stars: ✭ 686 (-14.99%)
Mutual labels:  uikit
Swiftui
A collaborative list of awesome SwiftUI resources. Feel free to contribute!
Stars: ✭ 774 (-4.09%)
Mutual labels:  uikit
Kick Off
UIkit 3 Starter Layout / Templates - Quick start for your UIkit 3 project!
Stars: ✭ 672 (-16.73%)
Mutual labels:  uikit
Paralayout
Paralayout is a set of simple, useful, and straightforward utilities that enable pixel-perfect layout in iOS. Your designers will love you.
Stars: ✭ 742 (-8.05%)
Mutual labels:  uikit
Cyltabbarcontroller
[EN]It is an iOS UI module library for adding animation to iOS tabbar items and icons with Lottie, and adding a bigger center UITabBar Item. [CN]【中国特色 TabBar】一行代码实现 Lottie 动画TabBar,支持中间带+号的TabBar样式,自带红点角标,支持动态刷新。【iOS13 & Dark Mode & iPhone XS MAX supported】
Stars: ✭ 6,605 (+718.46%)
Mutual labels:  uikit
Cardpresentationcontroller
Custom UIPresentationController which mimics the behavior of Apple Music UI
Stars: ✭ 778 (-3.59%)
Mutual labels:  uikit
Qmui ios
QMUI iOS——致力于提高项目 UI 开发效率的解决方案
Stars: ✭ 6,433 (+697.15%)
Mutual labels:  uikit

Image

InputBarAccessoryView

Features

  • [x] Autocomplete text with @mention, #hashtag or any other prefix
  • [x] A self-sizing UITextView with an optional fixed height (can be replaced with any other view)
  • [x] Image paste support
  • [x] Autocomplete attributed text highlighting
  • [x] Reactive components that respond to given events
  • [x] Top/Bottom/Left/Right InputStackViews that act as toolbars to place buttons
  • [x] RxSwift/RxCocoa Support with RxExtensions Cocoapod subspec
  • [x] Drop in attachment view for file/photo management
  • [x] Plugin support for your own InputPlugins
  • [x] Compatible with all iPhones and iPads
  • [x] RTL Support

Installation via Swift Package Manager (SPM)

The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift compiler. Once you have your Swift package set up, adding InputBarAccessoryView as a dependency is as easy as adding it to the dependencies value of your Package.swift.

dependencies: [
    .package(url: "https://github.com/nathantannar4/InputBarAccessoryView.git", .upToNextMajor(from: "5.2.0"))
]

You can also add it via XCode SPM editor with URL:

https://github.com/nathantannar4/InputBarAccessoryView.git

To make RxSwift/RxCocoa extensions work you need to explicitly import Rx dependencies.

Installation via CocoaPods

# Swift 5.3
pod 'InputBarAccessoryView'

# Swift 5.0
pod 'InputBarAccessoryView', '5.1.0'

Installation via Carthage

# Swift 5.3
github "nathantannar4/InputBarAccessoryView"

# Swift 5.0
github "nathantannar4/InputBarAccessoryView" "5.1.0"

Requirements

iOS 12.0+ Swift 5.3

The latest iOS 11 release is v5.1.0

The latest iOS 9 + iOS 10 release is v4.3.3

The latest Swift 5.0 release is v5.1.0

The latest Swift 4.2 release is v4.2.2

Documentation

Getting Started

See the Example project to see how you can make the iMessage, Slack, Facebook and GitHawk input bars!

Example Usage

Featured In

Add your app to the list of apps using this library and make a pull request.

See Also

iMessage style TypingIndicator for chat apps

Latest Releases

5.3.0

  • Allow setting canBecomeFirstResponder
  • Fix interactive keyboard dismissal lag
  • Add example implemntation of sendButton animation

5.2.3

  • Fixed appendSpaceOnCompletion inserting space at wrong location

5.2.2

  • Added an optional offset in KeyboardManager.bind(tableView:)
  • Change reuseIdentifier from public to open to allow inheritance
  • Fix send button loading indicator for dark mode
  • Fix iOS 14 UIPasteboard system notification with images

5.2.0

  • Drop support for iOS 11 and bump minimum version to iOS 12+
  • Support Swift 5.3 and higher for XCode 12

See CHANGELOG for more details and older releases.

Find a bug? Open an issue!

Layout

The layout of the InputBarAccessoryView is made of of 4 InputStackView's and an InputTextView. The padding of the subviews can be easily adjusted by changing the padding and textViewPadding properties. The constraints will automatically be updated.

It is important to note that each of the InputStackView's to the left and right of the InputTextView are anchored by a width constraint. This way the InputTextView will always fill the space inbetween in addition to providing methods that can easily be called to hide all buttons to the right or left of the InputTextView by setting the width constraint constant to 0. The bottom and top stack views are not height constraint and rely on their intrinsicContentSize

func setLeftStackViewWidthConstant(to newValue: CGFloat, animated: Bool)

func setRightStackViewWidthConstant(to newValue: CGFloat, animated: Bool)

Reactive Hooks

Each InputBarButtonItem has properties that can hold actions that will be executed during various hooks such as the button being touched, the UITextViewtext changing and more! Thanks to these easy hooks with a few lines of code the items can be easily resized and animated similar to that of the Facebook messenger app.

// MARK: - Hooks
    
public typealias InputBarButtonItemAction = ((InputBarButtonItem) -> Void)    
    
private var onTouchUpInsideAction: InputBarButtonItemAction?
private var onKeyboardEditingBeginsAction: InputBarButtonItemAction?
private var onKeyboardEditingEndsAction: InputBarButtonItemAction?
private var onKeyboardSwipeGestureAction: ((InputBarButtonItem, UISwipeGestureRecognizer) -> Void)?
private var onTextViewDidChangeAction: ((InputBarButtonItem, InputTextView) -> Void)?
private var onSelectedAction: InputBarButtonItemAction?
private var onDeselectedAction: InputBarButtonItemAction?
private var onEnabledAction: InputBarButtonItemAction?
private var onDisabledAction: InputBarButtonItemAction?

Author

Nathan Tannar - https://nathantannar.me

License

Distributed under the MIT license. See LICENSE for more information.

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