diff --git a/Signal.xcodeproj/project.pbxproj b/Signal.xcodeproj/project.pbxproj index ff8f1140b..bd24f5e7d 100644 --- a/Signal.xcodeproj/project.pbxproj +++ b/Signal.xcodeproj/project.pbxproj @@ -233,7 +233,6 @@ A1C32D5017A06538000A904E /* AddressBookUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A1C32D4F17A06537000A904E /* AddressBookUI.framework */; }; A1C32D5117A06544000A904E /* AddressBook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A1C32D4D17A0652C000A904E /* AddressBook.framework */; }; A5509ECA1A69AB8B00ABA4BC /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A5509EC91A69AB8B00ABA4BC /* Main.storyboard */; }; - A5509ECD1A69B1D600ABA4BC /* CountryCodeTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = A5509ECC1A69B1D600ABA4BC /* CountryCodeTableViewCell.m */; }; A5E9D4BB1A65FAD800E4481C /* TSVideoAttachmentAdapter.m in Sources */ = {isa = PBXBuildFile; fileRef = A5E9D4B91A65FAD800E4481C /* TSVideoAttachmentAdapter.m */; }; AD41D7B51A6F6F0600241130 /* play_button.png in Resources */ = {isa = PBXBuildFile; fileRef = AD41D7B31A6F6F0600241130 /* play_button.png */; }; AD41D7B61A6F6F0600241130 /* play_button@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = AD41D7B41A6F6F0600241130 /* play_button@2x.png */; }; @@ -650,8 +649,6 @@ A1C32D4F17A06537000A904E /* AddressBookUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBookUI.framework; path = System/Library/Frameworks/AddressBookUI.framework; sourceTree = SDKROOT; }; A1FDCBEE16DAA6C300868894 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; A5509EC91A69AB8B00ABA4BC /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = Main.storyboard; path = Storyboard/Main.storyboard; sourceTree = ""; }; - A5509ECB1A69B1D600ABA4BC /* CountryCodeTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CountryCodeTableViewCell.h; sourceTree = ""; }; - A5509ECC1A69B1D600ABA4BC /* CountryCodeTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CountryCodeTableViewCell.m; sourceTree = ""; }; A5E9D4B91A65FAD800E4481C /* TSVideoAttachmentAdapter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TSVideoAttachmentAdapter.m; sourceTree = ""; }; A5E9D4BA1A65FAD800E4481C /* TSVideoAttachmentAdapter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TSVideoAttachmentAdapter.h; sourceTree = ""; }; AD2AB1207E8888E4262D781B /* Pods-SignalTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SignalTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SignalTests/Pods-SignalTests.debug.xcconfig"; sourceTree = ""; }; @@ -1328,8 +1325,6 @@ 451764281DE939FD00EDB8B9 /* ContactCell.xib */, 76EB052E18170B33006006FC /* ContactTableViewCell.h */, 76EB052F18170B33006006FC /* ContactTableViewCell.m */, - A5509ECB1A69B1D600ABA4BC /* CountryCodeTableViewCell.h */, - A5509ECC1A69B1D600ABA4BC /* CountryCodeTableViewCell.m */, 45B201751DAECBFE00C461E0 /* HighlightableLabel.swift */, 4531C9C21DD8E6D800F08304 /* JSQMessagesCollectionViewCell+OWS.h */, 4531C9C31DD8E6D800F08304 /* JSQMessagesCollectionViewCell+OWS.m */, @@ -2038,7 +2033,6 @@ 34B3F8761E8DF1700035BE1A /* CodeVerificationViewController.m in Sources */, 76EB063E18170B33006006FC /* Operation.m in Sources */, 34B3F8741E8DF1700035BE1A /* AttachmentSharing.m in Sources */, - A5509ECD1A69B1D600ABA4BC /* CountryCodeTableViewCell.m in Sources */, 34D8C02B1ED3685800188D7C /* DebugUIContacts.m in Sources */, 45C9DEB81DF4E35A0065CA84 /* WebRTCCallMessageHandler.swift in Sources */, 34B3F88E1E8DF1700035BE1A /* PrivacySettingsTableViewController.m in Sources */, diff --git a/Signal/src/Storyboards/Registration.storyboard b/Signal/src/Storyboards/Registration.storyboard index 6ea413e55..ff03dee07 100644 --- a/Signal/src/Storyboards/Registration.storyboard +++ b/Signal/src/Storyboards/Registration.storyboard @@ -1,11 +1,11 @@ - - + + - + @@ -75,9 +75,6 @@ - - - @@ -228,6 +222,7 @@ + @@ -244,112 +239,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -396,10 +285,6 @@ - - - - diff --git a/Signal/src/ViewControllers/CountryCodeViewController.h b/Signal/src/ViewControllers/CountryCodeViewController.h index ef13036ff..4ceaf10f7 100644 --- a/Signal/src/ViewControllers/CountryCodeViewController.h +++ b/Signal/src/ViewControllers/CountryCodeViewController.h @@ -2,7 +2,7 @@ // Copyright (c) 2017 Open Whisper Systems. All rights reserved. // -#import +#import "OWSTableViewController.h" @class CountryCodeViewController; @@ -15,15 +15,10 @@ @end -@interface CountryCodeViewController - : UIViewController +#pragma mark - -@property (nonatomic) IBOutlet UITableView *countryCodeTableView; -@property (nonatomic) IBOutlet UISearchBar *searchBar; -@property (nonatomic, weak) id delegate; -@property (nonatomic) NSString *countryCodeSelected; -@property (nonatomic) NSString *callingCodeSelected; -@property (nonatomic) NSString *countryNameSelected; -@property (nonatomic) BOOL shouldDismissWithoutSegue; +@interface CountryCodeViewController : OWSTableViewController + +@property (nonatomic, weak) id countryCodeDelegate; @end diff --git a/Signal/src/ViewControllers/CountryCodeViewController.m b/Signal/src/ViewControllers/CountryCodeViewController.m index 4fa7e2df7..e76652358 100644 --- a/Signal/src/ViewControllers/CountryCodeViewController.m +++ b/Signal/src/ViewControllers/CountryCodeViewController.m @@ -2,99 +2,159 @@ // Copyright (c) 2017 Open Whisper Systems. All rights reserved. // -#import "CountryCodeTableViewCell.h" #import "CountryCodeViewController.h" #import "PhoneNumberUtil.h" -#import "FunctionalUtil.h" +#import "UIColor+OWS.h" +#import "UIFont+OWS.h" +#import "UIView+OWS.h" -static NSString *const CONTRY_CODE_TABLE_CELL_IDENTIFIER = @"CountryCodeTableViewCell"; -static NSString *const kUnwindToCountryCodeWasSelectedSegue = @"UnwindToCountryCodeWasSelectedSegue"; +@interface CountryCodeViewController () -@interface CountryCodeViewController () { - NSArray *_countryCodes; -} +@property (nonatomic, readonly) UISearchBar *searchBar; + +@property (nonatomic) NSArray *countryCodes; @end +#pragma mark - + @implementation CountryCodeViewController -- (void)viewDidLoad { - [super viewDidLoad]; +- (void)loadView +{ + [super loadView]; + + self.view.backgroundColor = [UIColor whiteColor]; [self.navigationController.navigationBar setTranslucent:NO]; - _countryCodes = [PhoneNumberUtil countryCodesForSearchTerm:nil]; - self.title = NSLocalizedString(@"COUNTRYCODE_SELECT_TITLE", @""); - self.searchBar.delegate = self; - if (self.shouldDismissWithoutSegue) { - self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemStop - target:self - action:@selector(dismissWasPressed:)]; - } + self.title = NSLocalizedString(@"COUNTRYCODE_SELECT_TITLE", @""); + + self.countryCodes = [PhoneNumberUtil countryCodesForSearchTerm:nil]; + + self.navigationItem.leftBarButtonItem = + [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemStop + target:self + action:@selector(dismissWasPressed:)]; + + [self createViews]; } -#pragma mark - UITableViewDelegate +- (void)createViews +{ + // Search + UISearchBar *searchBar = [UISearchBar new]; + _searchBar = searchBar; + searchBar.searchBarStyle = UISearchBarStyleMinimal; + searchBar.delegate = self; + searchBar.placeholder = NSLocalizedString(@"SEARCH_BYNAMEORNUMBER_PLACEHOLDER_TEXT", @""); + searchBar.backgroundColor = [UIColor whiteColor]; + [searchBar sizeToFit]; + + self.tableView.tableHeaderView = searchBar; -- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { - return (NSInteger)_countryCodes.count; + [self updateTableContents]; } -- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { - CountryCodeTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CONTRY_CODE_TABLE_CELL_IDENTIFIER]; - if (!cell) { - cell = [[CountryCodeTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault - reuseIdentifier:CONTRY_CODE_TABLE_CELL_IDENTIFIER]; +#pragma mark - Table Contents + +- (void)updateTableContents +{ + OWSTableContents *contents = [OWSTableContents new]; + + __weak CountryCodeViewController *weakSelf = self; + OWSTableSection *section = [OWSTableSection new]; + + for (NSString *countryCode in self.countryCodes) { + OWSAssert(countryCode.length > 0); + OWSAssert([PhoneNumberUtil countryNameFromCountryCode:countryCode].length > 0); + OWSAssert([PhoneNumberUtil callingCodeFromCountryCode:countryCode].length > 0); + OWSAssert(![[PhoneNumberUtil callingCodeFromCountryCode:countryCode] isEqualToString:@"+0"]); + + [section addItem:[OWSTableItem itemWithCustomCellBlock:^{ + UITableViewCell *cell = [UITableViewCell new]; + cell.textLabel.text = [PhoneNumberUtil countryNameFromCountryCode:countryCode]; + cell.textLabel.font = [UIFont ows_regularFontWithSize:18.f]; + cell.textLabel.textColor = [UIColor blackColor]; + + UILabel *countryCodeLabel = [UILabel new]; + countryCodeLabel.text = [PhoneNumberUtil callingCodeFromCountryCode:countryCode]; + countryCodeLabel.font = [UIFont ows_regularFontWithSize:16.f]; + countryCodeLabel.textColor = [UIColor ows_darkGrayColor]; + [countryCodeLabel sizeToFit]; + cell.accessoryView = countryCodeLabel; + + return cell; + } + actionBlock:^{ + [weakSelf countryCodeWasSelected:countryCode]; + }]]; } - NSString *countryCode = _countryCodes[(NSUInteger)indexPath.row]; - OWSAssert(countryCode.length > 0); - OWSAssert([PhoneNumberUtil countryNameFromCountryCode:countryCode].length > 0); - OWSAssert([PhoneNumberUtil callingCodeFromCountryCode:countryCode].length > 0); - OWSAssert(![[PhoneNumberUtil callingCodeFromCountryCode:countryCode] isEqualToString:@"+0"]); - - [cell configureWithCountryCode:[PhoneNumberUtil callingCodeFromCountryCode:countryCode] - andCountryName:[PhoneNumberUtil countryNameFromCountryCode:countryCode]]; + [contents addSection:section]; - return cell; + self.contents = contents; } -- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { - NSString *countryCode = _countryCodes[(NSUInteger)indexPath.row]; - _callingCodeSelected = [PhoneNumberUtil callingCodeFromCountryCode:countryCode]; - _countryNameSelected = [PhoneNumberUtil countryNameFromCountryCode:countryCode]; - _countryCodeSelected = countryCode; - [self.delegate countryCodeViewController:self - didSelectCountryCode:_countryCodeSelected - countryName:_countryNameSelected - callingCode:_callingCodeSelected]; +- (void)countryCodeWasSelected:(NSString *)countryCode +{ + OWSAssert(countryCode.length > 0); + + NSString *callingCodeSelected = [PhoneNumberUtil callingCodeFromCountryCode:countryCode]; + NSString *countryNameSelected = [PhoneNumberUtil countryNameFromCountryCode:countryCode]; + NSString *countryCodeSelected = countryCode; + [self.countryCodeDelegate countryCodeViewController:self + didSelectCountryCode:countryCodeSelected + countryName:countryNameSelected + callingCode:callingCodeSelected]; [self.searchBar resignFirstResponder]; - if (self.shouldDismissWithoutSegue) { - [self dismissViewControllerAnimated:YES completion:nil]; - } else { - [self performSegueWithIdentifier:kUnwindToCountryCodeWasSelectedSegue sender:self]; - } + [self dismissViewControllerAnimated:YES completion:nil]; } - (void)dismissWasPressed:(id)sender { [self dismissViewControllerAnimated:YES completion:nil]; } -- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { - return 44.0f; -} #pragma mark - UISearchBarDelegate -- (void)searchBar:(UISearchBar *)searchBar textDidChange:(NSString *)searchText { - _countryCodes = [PhoneNumberUtil countryCodesForSearchTerm:searchText]; - [self.countryCodeTableView reloadData]; +- (void)searchBar:(UISearchBar *)searchBar textDidChange:(NSString *)searchText +{ + [self searchTextDidChange]; +} + +- (void)searchBarSearchButtonClicked:(UISearchBar *)searchBar +{ + [self searchTextDidChange]; +} + +- (void)searchBarCancelButtonClicked:(UISearchBar *)searchBar +{ + [self searchTextDidChange]; } -- (void)filterContentForSearchText:(NSString *)searchText scope:(NSString *)scope { - _countryCodes = [PhoneNumberUtil countryCodesForSearchTerm:searchText]; +- (void)searchBarResultsListButtonClicked:(UISearchBar *)searchBar +{ + [self searchTextDidChange]; +} + +- (void)searchBar:(UISearchBar *)searchBar selectedScopeButtonIndexDidChange:(NSInteger)selectedScope +{ + [self searchTextDidChange]; +} + +- (void)searchTextDidChange +{ + NSString *searchText = + [self.searchBar.text stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]; + + self.countryCodes = [PhoneNumberUtil countryCodesForSearchTerm:searchText]; + + [self updateTableContents]; } -#pragma mark - UIScrollViewDelegate +#pragma mark - OWSTableViewControllerDelegate -- (void)scrollViewDidScroll:(UIScrollView *)scrollView { +- (void)tableViewDidScroll +{ [self.searchBar resignFirstResponder]; } diff --git a/Signal/src/ViewControllers/RegistrationViewController.h b/Signal/src/ViewControllers/RegistrationViewController.h index dbc25963b..eebd4c520 100644 --- a/Signal/src/ViewControllers/RegistrationViewController.h +++ b/Signal/src/ViewControllers/RegistrationViewController.h @@ -1,9 +1,5 @@ // -// RegistrationViewController.h -// Signal -// -// Created by Dylan Bourgeois on 13/11/14. -// Copyright (c) 2014 Open Whisper Systems. All rights reserved. +// Copyright (c) 2017 Open Whisper Systems. All rights reserved. // #import @@ -13,24 +9,22 @@ @interface RegistrationViewController : UIViewController // Country code -@property (nonatomic, strong) IBOutlet UIButton *countryNameButton; -@property (nonatomic, strong) IBOutlet UIButton *countryCodeButton; +@property (nonatomic) IBOutlet UIButton *countryNameButton; +@property (nonatomic) IBOutlet UIButton *countryCodeButton; +@property (nonatomic) IBOutlet UIView *countryCodeRow; // Phone number -@property (nonatomic, strong) IBOutlet UITextField *phoneNumberTextField; -@property (nonatomic, strong) IBOutlet UIButton *phoneNumberButton; -@property (nonatomic, strong) IBOutlet UILabel *titleLabel; +@property (nonatomic) IBOutlet UITextField *phoneNumberTextField; +@property (nonatomic) IBOutlet UIButton *phoneNumberButton; +@property (nonatomic) IBOutlet UILabel *titleLabel; // Button -@property (nonatomic, strong) IBOutlet UIButton *sendCodeButton; -@property (nonatomic, strong) IBOutlet UIButton *existingUserButton; +@property (nonatomic) IBOutlet UIButton *sendCodeButton; +@property (nonatomic) IBOutlet UIButton *existingUserButton; -@property (nonatomic, strong) IBOutlet UIActivityIndicatorView *spinnerView; +@property (nonatomic) IBOutlet UIActivityIndicatorView *spinnerView; @property (nonatomic) IBOutlet UIImageView *signalLogo; @property (nonatomic) IBOutlet UIView *registrationHeader; @property (nonatomic) IBOutlet NSLayoutConstraint *headerHeightConstraint; -- (IBAction)unwindToCountryCodeWasSelected:(UIStoryboardSegue *)segue; -- (IBAction)unwindToCountryCodeSelectionCancelled:(UIStoryboardSegue *)segue; - @end diff --git a/Signal/src/ViewControllers/RegistrationViewController.m b/Signal/src/ViewControllers/RegistrationViewController.m index 79b4f1ee7..07a3b09ec 100644 --- a/Signal/src/ViewControllers/RegistrationViewController.m +++ b/Signal/src/ViewControllers/RegistrationViewController.m @@ -16,7 +16,7 @@ static NSString *const kCodeSentSegue = @"codeSent"; -@interface RegistrationViewController () +@interface RegistrationViewController () @property (nonatomic) NSString *callingCode; @@ -48,6 +48,16 @@ static NSString *const kCodeSentSegue = @"codeSent"; [_sendCodeButton setTitle:NSLocalizedString(@"REGISTRATION_VERIFY_DEVICE", @"") forState:UIControlStateNormal]; [_existingUserButton setTitle:NSLocalizedString(@"ALREADY_HAVE_ACCOUNT_BUTTON", @"registration button text") forState:UIControlStateNormal]; + + [self.countryNameButton addTarget:self + action:@selector(changeCountryCodeTapped) + forControlEvents:UIControlEventTouchUpInside]; + [self.countryCodeButton addTarget:self + action:@selector(changeCountryCodeTapped) + forControlEvents:UIControlEventTouchUpInside]; + [self.countryCodeRow + addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self + action:@selector(countryCodeRowWasTapped:)]]; } - (void)viewWillAppear:(BOOL)animated { @@ -175,9 +185,20 @@ static NSString *const kCodeSentSegue = @"codeSent"; smsVerification:YES]; } -- (IBAction)changeCountryCodeTapped { +- (void)countryCodeRowWasTapped:(UIGestureRecognizer *)sender +{ + if (sender.state == UIGestureRecognizerStateRecognized) { + [self changeCountryCodeTapped]; + } +} + +- (void)changeCountryCodeTapped +{ CountryCodeViewController *countryCodeController = [CountryCodeViewController new]; - [self presentViewController:countryCodeController animated:YES completion:[UIUtil modalCompletionBlock]]; + countryCodeController.countryCodeDelegate = self; + UINavigationController *navigationController = + [[UINavigationController alloc] initWithRootViewController:countryCodeController]; + [self presentViewController:navigationController animated:YES completion:[UIUtil modalCompletionBlock]]; } - (void)presentInvalidCountryCodeError { @@ -187,6 +208,23 @@ static NSString *const kCodeSentSegue = @"codeSent"; @"DISMISS_BUTTON_TEXT", @"Generic short text for button to dismiss a dialog")]; } +#pragma mark - CountryCodeViewControllerDelegate + +- (void)countryCodeViewController:(CountryCodeViewController *)vc + didSelectCountryCode:(NSString *)countryCode + countryName:(NSString *)countryName + callingCode:(NSString *)callingCode +{ + OWSAssert(countryCode.length > 0); + OWSAssert(countryName.length > 0); + OWSAssert(callingCode.length > 0); + + [self updateCountryWithName:countryName callingCode:callingCode countryCode:countryCode]; + + // Trigger the formatting logic with a no-op edit. + [self textField:self.phoneNumberTextField shouldChangeCharactersInRange:NSMakeRange(0, 0) replacementString:@""]; +} + #pragma mark - Keyboard notifications - (void)initializeKeyboardHandlers { @@ -224,19 +262,6 @@ static NSString *const kCodeSentSegue = @"codeSent"; - (IBAction)unwindToChangeNumber:(UIStoryboardSegue *)sender { } -- (IBAction)unwindToCountryCodeSelectionCancelled:(UIStoryboardSegue *)segue { -} - -- (IBAction)unwindToCountryCodeWasSelected:(UIStoryboardSegue *)segue { - CountryCodeViewController *vc = [segue sourceViewController]; - [self updateCountryWithName:vc.countryNameSelected - callingCode:vc.callingCodeSelected - countryCode:vc.countryCodeSelected]; - - // Reformat phone number - [self textField:_phoneNumberTextField shouldChangeCharactersInRange:NSMakeRange(0, 0) replacementString:@""]; -} - #pragma mark iPhone 5s or shorter - (void)adjustScreenSizes diff --git a/Signal/src/ViewControllers/SelectRecipientViewController.m b/Signal/src/ViewControllers/SelectRecipientViewController.m index f7413ae45..2955c397b 100644 --- a/Signal/src/ViewControllers/SelectRecipientViewController.m +++ b/Signal/src/ViewControllers/SelectRecipientViewController.m @@ -284,10 +284,8 @@ NSString *const kSelectRecipientViewControllerCellIdentifier = @"kSelectRecipien - (void)showCountryCodeView:(nullable id)sender { - CountryCodeViewController *countryCodeController = [[UIStoryboard storyboardWithName:@"Registration" bundle:NULL] - instantiateViewControllerWithIdentifier:@"CountryCodeViewController"]; - countryCodeController.delegate = self; - countryCodeController.shouldDismissWithoutSegue = YES; + CountryCodeViewController *countryCodeController = [CountryCodeViewController new]; + countryCodeController.countryCodeDelegate = self; UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:countryCodeController]; [self presentViewController:navigationController animated:YES completion:[UIUtil modalCompletionBlock]]; @@ -416,6 +414,9 @@ NSString *const kSelectRecipientViewControllerCellIdentifier = @"kSelectRecipien countryName:(NSString *)countryName callingCode:(NSString *)callingCode { + OWSAssert(countryCode.length > 0); + OWSAssert(countryName.length > 0); + OWSAssert(callingCode.length > 0); [self updateCountryWithName:countryName callingCode:callingCode countryCode:countryCode]; diff --git a/Signal/src/views/CountryCodeTableViewCell.h b/Signal/src/views/CountryCodeTableViewCell.h deleted file mode 100644 index ba6c3eaf1..000000000 --- a/Signal/src/views/CountryCodeTableViewCell.h +++ /dev/null @@ -1,10 +0,0 @@ -#import - -@interface CountryCodeTableViewCell : UITableViewCell - -@property (nonatomic, strong) IBOutlet UILabel *countryCodeLabel; -@property (nonatomic, strong) IBOutlet UILabel *countryNameLabel; - -- (void)configureWithCountryCode:(NSString *)code andCountryName:(NSString *)name; - -@end diff --git a/Signal/src/views/CountryCodeTableViewCell.m b/Signal/src/views/CountryCodeTableViewCell.m deleted file mode 100644 index 10aec4321..000000000 --- a/Signal/src/views/CountryCodeTableViewCell.m +++ /dev/null @@ -1,19 +0,0 @@ -#import "CountryCodeTableViewCell.h" - -@implementation CountryCodeTableViewCell - -- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { - self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; - return self; -} - -- (NSString *)reuseIdentifier { - return NSStringFromClass(self.class); -} - -- (void)configureWithCountryCode:(NSString *)code andCountryName:(NSString *)name { - _countryCodeLabel.text = code; - _countryNameLabel.text = name; -} - -@end