Skip to main content
Version: Next

OCTitle - Custom SwiftUI Title component

OCTitle is a custom SwiftUI title component that enables you to create simple title to show text with highlighted color and style. OCTitle expect the text to have ... format. This README will guide you through using and integrating the OCTitle component into your SwiftUI projects.

Features

  • Create a title with custom highlight color and text style.

Installation

  1. Copy the OCTitle struct code from [OCTitle.swift] and add associated Utils files to your project.

Usage

You can create an instance of OCTitle by initializing it with the below parameters.

    let style = OCTitleStyle(textColor: .bubbleRed, highlightColor: .progressSpinner, textStyle: .body1SemiBold)
OCTitle("This <highlight>text</highlight> is a <highlight>highlighted text</highlight>".localized, style: style)