MAFUILabel uses the MAFStyling protocol to extend the native UILabel class with MAF styling capability.
MAFUILabel* label = [[MAFUILabel alloc] initWithFrame:CGRectMake(60, 30, 200, 40)]; [label setText:@"Standard label"]; [self.view addSubview:label]; [label release];
<Style TargetType="Label" platform="ios"> <VisualStates> <VisualState Name="Highlighted"> <Setter Property="Shadow" Value="#FFFFFF"/> </VisualState> </VisualStates> <Setter Property="FontFamily" Value="Helvetica-Bold"/> <Setter Property="FontSize" Value="17"/> <Setter Property="Foreground" Value="#555555"/> <Setter Property="Background" Value="#00000000"/> <Setter Property="HorizontalContentAlignment" Value="Left"/> <Setter Property="VerticalContentAlignment" Value="Top"/> </Style>
Background | Color of the UILabel's background; can be only a solid color, no freestyle gradient. Colors are defined as RGBA (red, green, blue, alpha). |
TextColor | The control's text color. |
FontFamily | The control's font family. |
FontSize | The control's font size. |
HorizontalContentAlignment | Horizontal alignment of the control's text. |
VerticalContentAlignment | Vertical alignment of the control's text. |
Border | The border attributes of the MAFUILabel include:
|
Shadow | The color of the control’s text shadow (shifted 2px*2px on x and y axis). |