2017-03-31 05:05:26 +02:00
|
|
|
//
|
|
|
|
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
#import <UIKit/UIKit.h>
|
|
|
|
|
2017-05-21 02:12:58 +02:00
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
2017-03-31 05:05:26 +02:00
|
|
|
@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.
|
2017-03-31 05:05:26 +02:00
|
|
|
+ (void)phoneNumberTextField:(UITextField *)textField
|
|
|
|
shouldChangeCharactersInRange:(NSRange)range
|
|
|
|
replacementString:(NSString *)insertionText
|
|
|
|
countryCode:(NSString *)countryCode;
|
|
|
|
|
2017-04-13 19:43:09 +02:00
|
|
|
+ (void)setAudioIgnoresHardwareMuteSwitch:(BOOL)shouldIgnore;
|
|
|
|
|
2017-07-12 16:46:54 +02:00
|
|
|
+ (NSString *)examplePhoneNumberForCountryCode:(NSString *)countryCode callingCode:(NSString *)callingCode;
|
|
|
|
|
|
|
|
#pragma mark - Formatting
|
|
|
|
|
|
|
|
+ (NSString *)formatInt:(int)value;
|
|
|
|
|
2017-04-26 17:36:07 +02:00
|
|
|
+ (NSString *)formatFileSize:(unsigned long)fileSize;
|
|
|
|
|
2017-05-03 16:50:26 +02:00
|
|
|
+ (NSString *)formatDurationSeconds:(long)timeSeconds;
|
|
|
|
|
2017-03-31 05:05:26 +02:00
|
|
|
@end
|
2017-05-21 02:12:58 +02:00
|
|
|
|
|
|
|
NS_ASSUME_NONNULL_END
|