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 OCTitle
component into your SwiftUI projects.
Features
- Create a title with custom highlight color and text style.
Installation
- 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)