Signal-iOS/Signal/src/ViewControllers/ViewControllerUtils.h
Matthew Chen 33415eaa0f Respond to CR.
// FREEBIE
2017-05-03 17:05:27 -04:00

34 lines
1.0 KiB
Objective-C

//
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface ViewControllerUtils : NSObject
- (instancetype)init NS_UNAVAILABLE;
// 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 *)formatFileSize:(unsigned long)fileSize;
+ (NSString *)formatDurationSeconds:(long)timeSeconds;
#pragma mark - Alerts
+ (UIAlertController *)showAlertWithTitle:(NSString *)title message:(NSString *)message;
+ (UIAlertController *)showAlertWithTitle:(NSString *)title
message:(NSString *)message
buttonLabel:(NSString *)buttonLabel;
@end