Structures

The following structures are available globally.

  • Структура - обертка для получения высоты и ширины телефона

    Text("Hello").frame(width: Display.width, height: Display.height * 0.9)
    
    See more

    Declaration

    Swift

    public struct Display
  • Структура для постройки URL

    See more

    Declaration

    Swift

    public struct URLBuilder
  • Структура с функциями-помощниками

    See more

    Declaration

    Swift

    public struct FuncHelper
  • Заставляет Encodable and Decodable свойства превращаться в null вместо того, чтобы убирать значения из объекта при сериализации.

    struct User: Codable {
        var name: String = ""
        @NullCodable var favMusicAlbum: String?
    }
    // При декодировании структуры или в использовании Alamofire
    // Получается такой json
    // Output json:
    // { "name": "",  favMusicAlbum: null }
    
    See more

    Declaration

    Swift

    @propertyWrapper
    public struct NullCodable<T>
    extension NullCodable: Encodable where T: Encodable
    extension NullCodable: Decodable where T: Decodable

StringInputTypeProtocol TextReplacing Extension

  • Структура подписанная под протокол StringInputTypeProtocol упрощающая взаимодействие клиента с функциями форматирования текста

    See more

    Declaration

    Swift

    public struct StringInputType : StringInputTypeProtocol