A Swift µframework providing a fluent, strongly typed, and safe API for creating and manipulating NSAttributedString instances.
Attributed is a Swift µframework that provides a fluent, strongly typed, and safe API for creating and manipulating NSAttributedString instances. It solves the problem of NSAttributedString's error-prone dictionary-based interface by offering compile-time safety and a more intuitive syntax for styling text in iOS and macOS apps.
iOS and macOS developers working with styled text who want a safer and more expressive alternative to the standard NSAttributedString API, particularly those using Swift.
Developers choose Attributed because it eliminates runtime crashes from incorrect attribute keys, reduces boilerplate with a fluent API, and integrates seamlessly with existing NSAttributedString workflows while being lightweight and focused.
µframework for Attributed strings.
Prevents runtime crashes by replacing error-prone [String: Any] dictionaries with compile-time checked attributes, as emphasized in the README for safety.
Enables method chaining for readable and concise attributed string creation, reducing boilerplate compared to standard NSAttributedString APIs.
Provides a + operator to combine NSAttributedString instances, simplifying assembly of complex styled texts without manual range management.
Supports creating attributed strings through closures for inline and reusable attribute definitions, enhancing code organization and reusability.
The README acknowledges users might need to request missing features, indicating not all NSAttributedString attributes are supported out of the box, requiring extensions for niche cases.
Adds a framework dependency via CocoaPods or Carthage for functionality that native NSAttributedString can provide, which may be unnecessary for minimalist projects or those avoiding third-party libs.
Requires Swift 4.0+ and Xcode 9.0, which could hinder adoption in legacy projects stuck on older Swift versions or tools.
Powerful text framework for iOS to display and edit rich text.
A Swift framework for parsing, formatting and validating international phone numbers. Inspired by Google's libphonenumber.
A beautiful rich text WYSIWYG editor for iOS with a syntax highlighted source view
Beautiful, easy attributed strings in Swift
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.