internal UITextAttributes(NSDictionary dict)
        {
            if (dict == null)
            {
                return;
            }

            NSObject val;

            if (dict.TryGetValue(UITextAttributesConstants.Font, out val))
            {
                Font = val as UIFont;
            }
            if (dict.TryGetValue(UITextAttributesConstants.TextColor, out val))
            {
                TextColor = val as UIColor;
            }
            if (dict.TryGetValue(UITextAttributesConstants.TextShadowColor, out val))
            {
                TextShadowColor = val as UIColor;
            }
            if (dict.TryGetValue(UITextAttributesConstants.TextShadowOffset, out val))
            {
                var value = val as NSValue;
                if (value != null)
                {
                    TextShadowOffset = value.UIOffsetValue;
                }
            }
        }
Example #2
0
        internal UITextAttributes(NSDictionary dict)
        {
            if (dict == null)
                return;

            NSObject val;

            if (dict.TryGetValue (UITextAttributesConstants.Font, out val))
                Font = val as UIFont;
            if (dict.TryGetValue (UITextAttributesConstants.TextColor, out val))
                TextColor = val as UIColor;
            if (dict.TryGetValue (UITextAttributesConstants.TextShadowColor, out val))
                TextShadowColor = val as UIColor;
            if (dict.TryGetValue (UITextAttributesConstants.TextShadowOffset, out val)) {
                var value = val as NSValue;
                if (value != null)
                    TextShadowOffset = value.UIOffsetValue;
            }
        }