Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions Classes/ios/FUISegmentedControl.m
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ - (void)setupFonts {
nil];
} else {
// iOS6- methods
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
selectedAttributesDictionary = [NSDictionary dictionaryWithObjectsAndKeys:
self.selectedFontColor,
UITextAttributeTextColor,
Expand All @@ -138,6 +140,7 @@ - (void)setupFonts {
self.selectedFont,
UITextAttributeFont,
nil];
#pragma clang diagnostic pop
}

[self setTitleTextAttributes:selectedAttributesDictionary forState:UIControlStateSelected];
Expand All @@ -158,6 +161,8 @@ - (void)setupFonts {
nil];
} else {
// iOS6- methods.
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
deselectedAttributesDictionary = [NSDictionary dictionaryWithObjectsAndKeys:
self.deselectedFontColor,
UITextAttributeTextColor,
Expand All @@ -168,6 +173,7 @@ - (void)setupFonts {
self.deselectedFont,
UITextAttributeFont,
nil];
#pragma clang diagnostic pop
}
[self setTitleTextAttributes:deselectedAttributesDictionary forState:UIControlStateNormal];

Expand All @@ -187,6 +193,8 @@ - (void)setupFonts {
nil];
} else {
// iOS6- methods
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
disabledAttributesDictionary = [NSDictionary dictionaryWithObjectsAndKeys:
self.disabledFontColor,
UITextAttributeTextColor,
Expand All @@ -197,6 +205,7 @@ - (void)setupFonts {
self.disabledFont,
UITextAttributeFont,
nil];
#pragma clang diagnostic pop
}

[self setTitleTextAttributes:disabledAttributesDictionary forState:UIControlStateDisabled];
Expand All @@ -218,6 +227,8 @@ - (void)setupFonts {
nil];
} else {
// iOS6- methods
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
highlightedAttributesDictionary = [NSDictionary dictionaryWithObjectsAndKeys:
self.highlightedFontColor,
UITextAttributeTextColor,
Expand All @@ -228,6 +239,7 @@ - (void)setupFonts {
self.highlightedFont,
UITextAttributeFont,
nil];
#pragma clang diagnostic pop
}

[self setTitleTextAttributes:highlightedAttributesDictionary forState:UIControlStateHighlighted];
Expand Down
4 changes: 3 additions & 1 deletion Classes/ios/UINavigationBar+FlatUI.m
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@ - (void) configureFlatNavigationBarWithColor:(UIColor *)color {
[titleTextAttributes setObject:shadow forKey:NSShadowAttributeName];
} else {
// Pre-iOS6 methods
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
[titleTextAttributes setValue:[UIColor clearColor] forKey:UITextAttributeTextShadowColor];
[titleTextAttributes setValue:[NSValue valueWithUIOffset:UIOffsetZero] forKey:UITextAttributeTextShadowOffset];

#pragma clang diagnostic pop
}

[self setTitleTextAttributes:titleTextAttributes];
Expand Down