UIView(CLUViewRecordableAdditions)

@interface UIView (CLUViewRecordableAdditions)

UIView (CLUViewRecordableAdditions) category contains metho to parse UIView properties and encode them into json like dictionary To be able to include UIView properties into Clue report

  • Generate color dictionary which includes red, green, blue and alpha value of specific color

    @code { red : , green : , blue : , alpha : }

    Declaration

    Objective-C

    - (NSDictionary *)clue_colorPropertyDictionaryForColor:(UIColor *)color;

    Swift

    func clue_colorPropertyDictionary(for color: UIColor!) -> [AnyHashable : Any]!

    Parameters

    color

    Result color dictionary will be based on this UIColor object

    Return Value

    Color dictionary with data from selected UIColor object

  • Generate size dictionary which includes width and height of specific size

    @code { width : , height : }

    Declaration

    Objective-C

    - (NSDictionary *)clue_sizePropertyDictionaryForSize:(CGSize)size;

    Swift

    func clue_sizePropertyDictionary(for size: CGSize) -> [AnyHashable : Any]!

    Parameters

    size

    Result size dictionary will be based on this CGSize value

    Return Value

    Size dictionary with data from selected CGSize value

  • Generate font dictionary which includes familyName, fontName, pointSize and lineHeight of specific font

    @code { familyName : , fontName : , pointSize : , lineHeight : }

    Declaration

    Objective-C

    - (NSDictionary *)clue_fontPropertyDictionaryForFont:(UIFont *)font;

    Swift

    func clue_fontPropertyDictionary(for font: UIFont!) -> [AnyHashable : Any]!

    Parameters

    font

    Result font dictionary will be based on this UIFont object

    Return Value

    Font dictionary with data from selected UIFont object

  • Generate attributed string dictionary which includes string object of specific attributed string

    @code { string : }

    Declaration

    Objective-C

    - (NSDictionary *)clue_attributedTextPropertyDictionaryForAttributedString:
        (NSAttributedString *)attributedText;

    Swift

    func clue_attributedTextPropertyDictionary(for attributedText: NSAttributedString!) -> [AnyHashable : Any]!

    Parameters

    attributedText

    Result attributed string dictionary will be based on this NSAttributedString object

    Return Value

    Attributed String dictionary with data from selected NSAttributedString object

  • Generate layout margin dictionary which includes left, top, right and bottom margins for current UIView object

    Warning

    This method doesn’t have any input, it generates dictionary based on current UIView object

    @code { left : , top : , right : , bottom : }

    Declaration

    Objective-C

    - (NSDictionary *)clue_layoutMarginsPropertyDictionary;

    Swift

    func clue_layoutMarginsPropertyDictionary() -> [AnyHashable : Any]!

    Return Value

    Layout Margin dictionary with data from current UIView object

  • Generate frame dictionary which includes x, y, width and height for current UIView object

    Warning

    This method doesn’t have any input, it generates dictionary based on current UIView object

    @code { x : , y : , width : , height : }

    Declaration

    Objective-C

    - (NSDictionary *)clue_frameProprtyDictionary;

    Swift

    func clue_frameProprtyDictionary() -> [AnyHashable : Any]!

    Return Value

    Frame dictionary with data from current UIView object