AdmiralUIKit Views TextBlock Paragraph - admiral-team/admiralui-ios GitHub Wiki
Overview
Paragraph - A group of text components exists in several variants.
Code
let pointParagraph = Paragraph()
pointParagraph.title = titleSmallText
pointParagraph.paragraphStyle = style
pointParagraph.paragraphType = .point
views.append(ParagraphCellView(paragraph: pointParagraph, titleText: titleText))
let checkParagraph = Paragraph()
checkParagraph.title = titleSmallText
checkParagraph.paragraphStyle = style
checkParagraph.paragraphType = .check
views.append(ParagraphCellView(paragraph: checkParagraph))
let leftParagraph = Paragraph()
leftParagraph.title = titleLargeText
leftParagraph.paragraphStyle = style
views.append(ParagraphCellView(paragraph: leftParagraph, heightParagraph: LayoutGrid.doubleModule * 5))
let rightParagraph = Paragraph()
rightParagraph.title = titleLargeText
rightParagraph.paragraphStyle = style
rightParagraph.traillingImage = Asset.Card.info.image
views.append(ParagraphCellView(paragraph: rightParagraph, heightParagraph: LayoutGrid.doubleModule * 5))
let centrLargeParagraph = Paragraph()
centrLargeParagraph.title = titleLargeText
centrLargeParagraph.textAligment = .center
centrLargeParagraph.paragraphStyle = style
views.append(ParagraphCellView(paragraph: centrLargeParagraph, heightParagraph: LayoutGrid.doubleModule * 5))
You can create a ParagraphView by specifying the following parameters in the initializer:
- title: String? - The text that the label displays
- paragraphType: ParagaphImageType? - A type of paragraph Image. Can be: point, check, custom (your image)
- leadingImage: UImage? - Leading image.
- trailingImage: UImage? - Trailing image.
- paragraphStyle: ParagraphStyle - A style of Paragraph fount and text color. Can be primary or secondary.
- textAligment: TextAlignment - Alignment text
Live Example
To run live demo with Paragraph
open Xcode and run project with Example target. Then in the main page open TextBlock/Paragraph:
Contribution
You can help us to find bugs or ask us to add features.
- To start
issue
please use ready-made templates. - To make changes to the repository, you need to create a
fork
of the project, make changes to the code and create apull request
in our project. You can read more about this in the Github documentation.