session-ios/Signal/src/ViewControllers/ViewControllerUtils.h

36 lines
958 B
C
Raw Normal View History

//
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface ViewControllerUtils : NSObject
- (instancetype)init NS_UNAVAILABLE;
2017-04-03 23:12:29 +02:00
// This convenience function can be used to reformat the contents of
// a phone number text field as the user modifies its text by typing,
// pasting, etc.
+ (void)phoneNumberTextField:(UITextField *)textField
shouldChangeCharactersInRange:(NSRange)range
replacementString:(NSString *)insertionText
countryCode:(NSString *)countryCode;
+ (void)setAudioIgnoresHardwareMuteSwitch:(BOOL)shouldIgnore;
+ (NSString *)examplePhoneNumberForCountryCode:(NSString *)countryCode callingCode:(NSString *)callingCode;
#pragma mark - Formatting
+ (NSString *)formatInt:(int)value;
+ (NSString *)formatFileSize:(unsigned long)fileSize;
2017-05-03 16:50:26 +02:00
+ (NSString *)formatDurationSeconds:(long)timeSeconds;
@end
NS_ASSUME_NONNULL_END