thedarkwik

iconfont

Feb 23rd, 2021 (edited)
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.57 KB | None | 0 0
  1. What can i do if the icon font not showing in ios? it working in windows uwp and android.
  2. i have this code in app.xaml
  3.  
  4. <OnPlatform x:Key="FontIcons" x:TypeArguments="x:String">
  5. <OnPlatform.Platforms>
  6. <On Platform="Android" Value="UIFontIcons.ttf#UIFontIcons" />
  7. <On Platform="iOS" Value="UIFontIcons" />
  8. <On Platform="UWP" Value="Assets/UIFontIcons.ttf#UIFontIcons" />
  9. </OnPlatform.Platforms>
  10. </OnPlatform>
  11.  
  12. in the styles file for homepage.xaml i have codes like this in it for the buttons.
  13.  
  14. <Style x:Key="ActionBarSettingIconStyle" TargetType="Button">
  15. <Setter Property="TextColor" Value="{DynamicResource ActionBarbuttons}" />
  16. <Setter Property="FontFamily" Value="{StaticResource FontIcons}" />
  17. <Setter Property="BackgroundColor" Value="Transparent" />
  18. <Setter Property="Text" Value="&#xe72b;" />
  19. <Setter Property="FontSize" Value="20"/>
  20. <Setter Property="Padding" Value="{OnPlatform Default=8, UWP=6}" />
  21. <Setter Property="Margin" Value="4,8" />
  22. <Setter Property="FontAttributes" Value="Bold"/>
  23. <Setter Property="HeightRequest" Value="{OnPlatform Default=40, UWP=40}" />
  24. <Setter Property="WidthRequest" Value="{OnPlatform Default=40, UWP=40}" />
  25. </Style>
  26.  
  27. in homepage.xaml i have buttons like that for the buttons
  28.  
  29. x:Name="SettingsIcon"
  30. Clicked="ShowSettings"
  31. IsVisible="false"
  32. Style="{StaticResource ActionBarSettingIconStyle}"
  33. VerticalOptions="Start" />
  34.  
  35.  
  36. I have the UIFontIcons.ttf in the info.plist to
Add Comment
Please, Sign In to add comment