CPCViewTitleStyle
public struct CPCViewTitleStyle : Hashable, RawRepresentable, ExpressibleByStringLiteral
A value that holds information about formatting month titles.
-
Declaration
Swift
public typealias RawValue = String -
Declaration
Swift
public typealias StringLiteralType = String -
Month titles are not rendered.
Declaration
Swift
public static let none: (String) -> CPCViewTitleStyle -
Short title format: one-digit month number and full year.
Declaration
Swift
public static var short: CPCViewTitleStyle { get } -
Medium title format: two-digit zero-padded month number and full year.
Declaration
Swift
public static var medium: CPCViewTitleStyle { get } -
Long title format: abbreviated month name and full year.
Declaration
Swift
public static var long: CPCViewTitleStyle { get } -
Full title format: full month name and full year.
Declaration
Swift
public static var full: CPCViewTitleStyle { get } -
Default month title format, which is used when no format was explicitly set.
Declaration
Swift
public static var `default`: CPCViewTitleStyle { get } -
Create a new month title format using date format template for current locale.
Declaration
Swift
public static func customTemplate(_ template: String) -> CPCViewTitleStyle!Parameters
templateDate format template compatible with DateFormatter.
Return Value
Month title format that matches supplied parameters or
nilif format template is invalid. -
Create a new month title format using date format template.
Declaration
Swift
public static func customTemplate(_ template: String, locale: Locale) -> CPCViewTitleStyle!Parameters
templateDate format template compatible with DateFormatter.
localeLocale to evaluate format template.
Return Value
Month title format that matches supplied parameters or
nilif format template is invalid. -
Create a new month title format using exact date format.
Declaration
Swift
public static func custom(_ format: String) -> CPCViewTitleStyleParameters
formatDate format to use for month title.
Return Value
Month title format that uses exact date
format. -
Declaration
Swift
public let rawValue: String -
Declaration
Swift
public init(rawValue: String) -
Creates a new month title format from a string literal.
Firstly, given
stringLiteralis evaluated as a date format template with current locale. If this evaluation fails,stringLiteralis used as an exact date format.Declaration
Swift
public init(stringLiteral: String)Parameters
stringLiteralRequested date template format or an exact date format.
-
Create a new month title format using date format template for current locale.
Declaration
Swift
public init?(templateValue template: String)Parameters
templateDate format template compatible with DateFormatter.
-
Create a new month title format using date format template.
Declaration
Swift
public init?(templateValue template: String, locale: Locale)Parameters
templateDate format template compatible with DateFormatter.
localeLocale to evaluate format template.
View on GitHub
Install in Dash
CPCViewTitleStyle Structure Reference