session-ios/Signal/src/util/UIFont+OWS.m
Frederic Jacobs 2c83046ff6 Closes #990.
- Use single MessagesViewController. Goal: Being able to reuse that UI
for SplitViewController on iPad. Prevents unnecessary deallocations and
re-allocations.
- Remove custom archiving UI for default swipe right to left archive
action, like in iOS Mail.app.
- DynamicType for main view.
- Simplify API of MessagesViewController to prevent undefined behavior.
//FREEBIE
2015-12-26 18:12:13 +01:00

40 lines
929 B
Objective-C

//
// UIFont+OWS.m
// Signal
//
// Created by Dylan Bourgeois on 25/11/14.
// Copyright (c) 2014 Open Whisper Systems. All rights reserved.
//
#import "UIFont+OWS.h"
@implementation UIFont (OWS)
+ (UIFont *)ows_thinFontWithSize:(CGFloat)size {
return [UIFont systemFontOfSize:size weight:UIFontWeightThin];
}
+ (UIFont *)ows_lightFontWithSize:(CGFloat)size {
return [UIFont systemFontOfSize:size weight:UIFontWeightLight];
}
+ (UIFont *)ows_regularFontWithSize:(CGFloat)size {
return [UIFont systemFontOfSize:size weight:UIFontWeightRegular];
}
+ (UIFont *)ows_mediumFontWithSize:(CGFloat)size {
return [UIFont systemFontOfSize:size weight:UIFontWeightMedium];
}
+ (UIFont *)ows_boldFontWithSize:(CGFloat)size {
return [UIFont boldSystemFontOfSize:size];
}
#pragma mark Dynamic Type
+ (UIFont *)ows_dynamicTypeBodyFont {
return [UIFont preferredFontForTextStyle:UIFontTextStyleBody];
}
@end