SZMentions alternatives and similar libraries
Based on the "Text" category.
Alternatively, view SZMentions alternatives based on common mentions on social networks and blogs.
-
YYText
Powerful text framework for iOS to display and edit rich text. -
Nimbus
The iOS framework that grows only as fast as its documentation -
PhoneNumberKit
A Swift framework for parsing, formatting and validating international phone numbers. Inspired by Google's libphonenumber. -
ZSSRichTextEditor
A beautiful rich text WYSIWYG editor for iOS with a syntax highlighted source view -
Twitter Text Obj
Twitter Text Libraries. This code is used at Twitter to tokenize and parse text to meet the expectations for what can be used on the platform. -
FontAwesomeKit
Icon font library for iOS. Currently supports Font-Awesome, Foundation icons, Zocial, and ionicons. -
SwiftRichString
👩🎨 Elegant Attributed String composition in Swift sauce -
libPhoneNumber-iOS
iOS port from libphonenumber (Google's phone number handling library) -
TwitterTextEditor
A standalone, flexible API that provides a full-featured rich text editor for iOS applications. -
RichEditorView
RichEditorView is a simple, modular, drop-in UIView subclass for Rich Text Editing. -
Down
Blazing fast Markdown / CommonMark rendering in Swift, built upon cmark. -
SwiftyMarkdown
Converts Markdown files and strings into NSAttributedStrings with lots of customisation options. -
SwiftString
A comprehensive, lightweight string extension for Swift -
Iconic
:art: Auto-generated icon font library for iOS, watchOS and tvOS -
MMMarkdown
An Objective-C framework for converting Markdown to HTML. -
CocoaMarkdown
Markdown parsing and rendering for iOS and OS X -
Atributika
Convert text with HTML tags, links, hashtags, mentions into NSAttributedString. Make them clickable with UILabel drop-in replacement. -
SwiftIconFont
Icons fonts for iOS (Font Awesome 5, Iconic, Ionicon, Octicon, Themify, MapIcon, MaterialIcon, Foundation 3, Elegant Icon, Captain Icon) -
FontBlaster
Programmatically load custom fonts into your iOS, macOS and tvOS app. -
Notepad
[iOS] A fully themeable markdown editor with live syntax highlighting. -
fuse-swift
A lightweight fuzzy-search library, with zero dependencies -
MarkdownKit
A simple and customizable Markdown Parser for Swift -
FormatterKit
stringWithFormat: for the sophisticated hacker set -
NSStringEmojize
A category on NSString to convert Emoji Cheat Sheet codes to their equivalent Unicode characters -
Guitar
A Cross-Platform String and Regular Expression Library written in Swift. -
Mustard
🌭 Mustard is a Swift library for tokenizing strings when splitting by whitespace doesn't cut it. -
Translucid
Lightweight library to set an Image as text background. Written in swift. -
GoogleMaterialDesignIcons
Google Material Design Icons Font for iOS -
Heimdall
Heimdall is a wrapper around the Security framework for simple encryption/decryption operations. -
AttributedTextView
Easiest way to create an attributed UITextView (with support for multiple links and from html)
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 SZMentions or a related project?
README
SZMentions is no longer being updated, please use SZMentionsSwift
SZMentions is a lightweight mentions library for iOS. This library was built to assist with the adding, removing and editing of a mention within a textview.
How To Get Started
- Download SZMentions and try out the iOS example app.
Communication
- If you need help, feel free to tweet @StevenZweier
- If you found a bug, have a feature request, or have a general question open an issue.
- If you want to contribute, submit a pull request.
Installation with CocoaPods
Podfile
To integrate SZMentions into your Xcode project using CocoaPods, specify it in your Podfile
:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
pod 'SZMentions'
Then, run the following command:
$ pod install
Requirements
SZMentions Version | Minimum iOS Target |
---|---|
0.0.x | iOS 8.1 |
Usage
Below is a quick run through of the objects used in this library but as always the best place to get an understanding of the current implementation of the SZMentions library is in the example code.
SZMentionsListener
This class manages the mention interaction.
Setup
Use one of the many initializers to setup your mentions listener. Parameters explained below:
textView
: required The text view we are applying the mentions listener to. Note: it's delegate must be the mentions manager.
mentionsManager
: required The class that will be handling the mention interaction.
delegate
: optional If you would like to receive UITextView delegate methods set this and it will be passed through after processing view the mentions listener.
defaultTextAttributes
: Attributes (see: SZAttribute
) to apply to the textview for all text that is not a mention.
mentionTextAttributes
: Attributes (see: SZAttribute
) to apply to the textview for all mentions
spaceAfterMention
: optional Whether or not you would like a space to be added to the end of your mentions. Default is NO
trigger
: The string used to start a mention. Default is @
cooldownInterval
: optional The amount of time to wait between calling showMentionsList. Default is 0.5
Properties
mentions
: readonly Array of all mentions currently applied to the text view.
Methods
- (void)addMention:(NSObject<SZCreateMentionProtocol> *)mention;
: Call this method while adding a mention to apply the mention to the current text.
SZCreateMentionProtocol
This required properties for a mention being sent to the mentions listener
SZMentionsManagerProtocol
The require methods for handling mention interaction.
- (void)showMentionsListWithString:(NSString *)mentionString;
lets the delegate know to show a mentions list as well as provides the current string typed into the textview, allowing for filtering of the mentions list.
- (void)hideMentionsList;
lets the delegate know we are no longer typing in a mention.
SZMention
This class is returned via the mentions
method, it includes the range
of the mention as well as object
containing the object sent to the mentions listener via the addMention:(id)mention
method.
SZAttribute
This class is used to pass attributes to apply mentions text as well as regular text.
Example:
SZAttribute *attribute = [[SZAttribute alloc] initWithAttributeName:NSForegroundColorAttributeName
attributeValue:[UIColor redColor]];
Unit Tests
SZMentions includes unit tests which can be run on the SZMentions framework
Credits
SZMentions was originally created by Steven Zweier