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
colorResult color dictionary will be based on this
UIColorobjectReturn Value
Color dictionary with data from selected
UIColorobject -
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
sizeResult size dictionary will be based on this
CGSizevalueReturn Value
Size dictionary with data from selected
CGSizevalue -
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
fontResult font dictionary will be based on this
UIFontobjectReturn Value
Font dictionary with data from selected
UIFontobject -
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
attributedTextResult attributed string dictionary will be based on this
NSAttributedStringobjectReturn Value
Attributed String dictionary with data from selected
NSAttributedStringobject -
Generate layout margin dictionary which includes left, top, right and bottom margins for current
UIViewobjectWarning
This method doesn’t have any input, it generates dictionary based on current
UIViewobject@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
UIViewobject -
Generate frame dictionary which includes x, y, width and height for current
UIViewobjectWarning
This method doesn’t have any input, it generates dictionary based on current
UIViewobject@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
UIViewobject
UIView(CLUViewRecordableAdditions) Category Reference