MessageViewController alternatives and similar libraries
Based on the "Messaging" category.
Alternatively, view MessageViewController alternatives based on common mentions on social networks and blogs.
-
JSQMessagesViewController
An elegant messages UI library for iOS. -
SlackTextViewController
A drop-in UIViewController subclass with a growing text input view and other useful messaging features. -
XMPPFramework
An XMPP Framework in Objective-C for Mac and iOS -
MessageKit
A community-driven replacement for JSQMessagesViewController -
Messenger
Open source alternative communication platform. -
Atlas
A library of native iOS messaging user interface components for Layer. -
Chatto
A lightweight framework to build chat applications, made in Swift -
NMessenger
A fast, lightweight messenger component built on AsyncDisplaykit and written in Swift -
chat-sdk-ios
Chat SDK iOS - Open Source Mobile Messenger -
Messenger Chat with Firebase
Messenger Clone - Real-time iOS Chat with Firebase Firestore written in Swift -
ChatLayout
ChatLayout is an alternative solution to MessageKit. It uses custom UICollectionViewLayout to provide you full control over the presentation as well as all the tools available in UICollectionView. It supports dynamic cells and supplementary view sizes. -
LayerKit
iOS SDK for Layer, the easiest way to add in-app messaging (text, photos, videos, data) to any mobile or web application. -
AsyncMessagesViewController
A smooth, responsive and flexible messages UI library for iOS. -
ExyteChat
A SwiftUI Chat UI framework with fully customizable message cells and a built-in media picker -
OTTextChatAccelerator
OpenTok Text Chat Accelerator Pack enables text messages between mobile or browser-based devices. -
SwiftyMessenger
Swift toolkit for passing messages between iOS apps and extensions. -
Twilio
Power modern communications. Build the next generation of voice and SMS applications.
Appwrite - The open-source backend cloud platform
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of MessageViewController or a related project?
README
Installation
Just add MessageViewController
to your Podfile and install. Done!
pod 'MessageViewController'
Setup
You must subclass MessageViewController
.
import MessageViewController
class ViewController: MessageViewController {
// ...
}
Finish setup using a UIScrollView
. Remember this can also be a UITableView
or UICollectionView
.
func viewDidLoad() {
super.viewDidLoad()
setup(scrollView: scrollView)
}
Customizations
You can customize any part of the UI that you want!
// Border between the text view and the scroll view
borderColor = .lightGray
// Change the appearance of the text view and its content
messageView.inset = UIEdgeInsets(top: 8, left: 16, bottom: 8, right: 16)
messageView.textView.placeholderText = "New message..."
messageView.textView.placeholderTextColor = .lightGray
messageView.font = .systemFont(ofSize: 17)
// Setup the button using text or an icon
messageView.set(buttonTitle: "Send", for: .normal)
messageView.addButton(target: self, action: #selector(onButton))
messageView.buttonTint = .blue
// Set custom attributes for an autocompleted string
let tintColor = .blue
messageAutocompleteController.autocompleteTextAttributes = ["@": [.font: UIFont.preferredFont(forTextStyle: .body), .foregroundColor: tintColor, .backgroundColor: tintColor.withAlphaComponent(0.1)]]
Autocomplete
The base view controller uses a MessageAutocompleteController
control to handle text autocompletion.
This control uses a plain UITableView
to display its autocomplete. Add a dataSource
and delegate
to display and handle interactions.
let tableView = messageAutocompleteController.tableView
tableView.register(UITableViewCell.self, forCellReuseIdentifier: "cell")
tableView.dataSource = self
tableView.delegate = self
Then register for autocomplete prefixes you want to respond to and set a delegate
to handle when a prefix is found.
messageAutocompleteController.register(prefix: "@")
messageAutocompleteController.delegate = self
Your delegate needs to implement just one method.
func didFind(controller: MessageAutocompleteController, prefix: String, word: String) {
// filter your data
controller.show(true)
}
Note: You can perform asyncronous autocomplete searches. Just be sure to call
messageAutocompleteController.show()
when finished.
Acknowledgements
- Heavy inspiration from SlackTextViewController
- Created with ❤️ by Ryan Nystrom