summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.iOS/Renderers/FontExtensions.cs
diff options
context:
space:
mode:
authorJason Smith <jason.smith@xamarin.com>2016-12-14 20:38:46 (GMT)
committerRui Marinho <me@ruimarinho.net>2016-12-14 20:38:46 (GMT)
commit9535315986c6ad5d51ec28f676310b9a5f7d444c (patch)
treed0492d1c6c35581040ca76aff4dc577c7227c840 /Xamarin.Forms.Platform.iOS/Renderers/FontExtensions.cs
parenteca25db80eebc2e7936f154246ed7996f6d071a1 (diff)
downloadxamarin-forms-9535315986c6ad5d51ec28f676310b9a5f7d444c.zip
xamarin-forms-9535315986c6ad5d51ec28f676310b9a5f7d444c.tar.gz
xamarin-forms-9535315986c6ad5d51ec28f676310b9a5f7d444c.tar.bz2
Deprecate versions of iOS older than 8 (#630)
Diffstat (limited to 'Xamarin.Forms.Platform.iOS/Renderers/FontExtensions.cs')
-rw-r--r--Xamarin.Forms.Platform.iOS/Renderers/FontExtensions.cs16
1 files changed, 2 insertions, 14 deletions
diff --git a/Xamarin.Forms.Platform.iOS/Renderers/FontExtensions.cs b/Xamarin.Forms.Platform.iOS/Renderers/FontExtensions.cs
index ae16c66..cbc2e62 100644
--- a/Xamarin.Forms.Platform.iOS/Renderers/FontExtensions.cs
+++ b/Xamarin.Forms.Platform.iOS/Renderers/FontExtensions.cs
@@ -41,7 +41,7 @@ namespace Xamarin.Forms.Platform.iOS
{
try
{
- if (UIFont.FamilyNames.Contains(self.FontFamily) && Forms.IsiOS7OrNewer)
+ if (UIFont.FamilyNames.Contains(self.FontFamily))
{
var descriptor = new UIFontDescriptor().CreateWithFamily(self.FontFamily);
@@ -67,12 +67,6 @@ namespace Xamarin.Forms.Platform.iOS
}
if (bold && italic)
{
- if (!Forms.IsiOS7OrNewer)
- {
- // not sure how to make a font both bold and italic in iOS 6, default to bold
- return UIFont.BoldSystemFontOfSize(size);
- }
-
var defaultFont = UIFont.SystemFontOfSize(size);
var descriptor = defaultFont.FontDescriptor.CreateWithTraits(UIFontDescriptorSymbolicTraits.Bold | UIFontDescriptorSymbolicTraits.Italic);
return UIFont.FromDescriptor(descriptor, 0);
@@ -110,7 +104,7 @@ namespace Xamarin.Forms.Platform.iOS
try
{
UIFont result;
- if (UIFont.FamilyNames.Contains(family) && Forms.IsiOS7OrNewer)
+ if (UIFont.FamilyNames.Contains(family))
{
var descriptor = new UIFontDescriptor().CreateWithFamily(family);
@@ -143,12 +137,6 @@ namespace Xamarin.Forms.Platform.iOS
{
var defaultFont = UIFont.SystemFontOfSize(size);
- if (!Forms.IsiOS7OrNewer)
- {
- // not sure how to make a font both bold and italic in iOS 6, default to bold
- return UIFont.BoldSystemFontOfSize(size);
- }
-
var descriptor = defaultFont.FontDescriptor.CreateWithTraits(UIFontDescriptorSymbolicTraits.Bold | UIFontDescriptorSymbolicTraits.Italic);
return UIFont.FromDescriptor(descriptor, 0);
}