Utils
class Utils
Utility class that provides some useful operations commonly used across the UnbluCoreSDK and it’s external modules
-
the screen resolution independent of the rotation. Always seen as in portrait rotation
Declaration
Swift
static let screenResolutionInPoints: CGSize
-
the screen resolution independent of the rotation. Always seen as in portrait rotation
Declaration
Swift
static let screenResolutionInPixel: CGSize
-
+
is not encoded as it is a valid sign but represents a space. We know that it should be encode… See https://stackoverflow.com/a/43054388/2778937Declaration
Swift
static func escapePlusInQueryParams(urlComponents: inout URLComponents)
-
Executes the given block on the main thread immediately if the current thread is “main”, or asynchronously otherwise.
Declaration
Swift
static func executeOnMain(_ block: @escaping () -> Void)
-
Creates a UIFont with the text style and traits taking into the account the user’s chosen content size category
Declaration
Swift
static func preferredFont(withTextStyle textStyle: UIFont.TextStyle, traits: UIFontDescriptor.SymbolicTraits) -> UIFont