added accessibility ids to HomeViewController and ProfileViewController

This commit is contained in:
Nancy Mast 2019-02-07 15:18:29 -08:00 committed by Matthew Chen
parent d76fac1096
commit 189bbb9f16
2 changed files with 13 additions and 2 deletions

View File

@ -340,7 +340,6 @@ typedef NS_ENUM(NSInteger, HomeViewControllerSection) {
[self.view addSubview:self.emptyInboxView];
[self.emptyInboxView autoPinWidthToSuperviewMargins];
[self.emptyInboxView autoVCenterInSuperview];
SET_SUBVIEW_ACCESSIBILITY_IDENTIFIER(self, _emptyInboxView);
[self createFirstConversationCueView];
[self.view addSubview:self.firstConversationCueView];
@ -361,6 +360,13 @@ typedef NS_ENUM(NSInteger, HomeViewControllerSection) {
action:@selector(pullToRefreshPerformed:)
forControlEvents:UIControlEventValueChanged];
[self.tableView insertSubview:pullToRefreshView atIndex:0];
SET_SUBVIEW_ACCESSIBILITY_IDENTIFIER(self, _tableView);
SET_SUBVIEW_ACCESSIBILITY_IDENTIFIER(self, _emptyInboxView);
SET_SUBVIEW_ACCESSIBILITY_IDENTIFIER(self, _firstConversationCueView);
SET_SUBVIEW_ACCESSIBILITY_IDENTIFIER(self, _firstConversationLabel);
SET_SUBVIEW_ACCESSIBILITY_IDENTIFIER(self, _searchBar);
SET_SUBVIEW_ACCESSIBILITY_IDENTIFIER(self, _reminderStackView);
}
- (UIView *)createEmptyInboxView

View File

@ -15,13 +15,18 @@
#import <SignalCoreKit/NSDate+OWS.h>
#import <SignalMessaging/OWSNavigationController.h>
#import <SignalMessaging/OWSProfileManager.h>
#import <SignalMessaging/UIUtil.h>
#import <SignalMessaging/UIViewController+OWS.h>
#import <SignalServiceKit/NSString+SSK.h>
#import <SignalServiceKit/OWSPrimaryStorage.h>
#import <SignalMessaging/UIUtil.h>
NS_ASSUME_NONNULL_BEGIN
#define SUBVIEW_ACCESSIBILITY_IDENTIFIER(_root_view, _variable_name) \
([NSString stringWithFormat:@"%@.%@", _root_view.class, _variable_name])
#define SET_SUBVIEW_ACCESSIBILITY_IDENTIFIER(_root_view, _variable_name) \
_variable_name.accessibilityIdentifier = SUBVIEW_ACCESSIBILITY_IDENTIFIER(_root_view, (@ #_variable_name))
typedef NS_ENUM(NSInteger, ProfileViewMode) {
ProfileViewMode_AppSettings = 0,
ProfileViewMode_Registration,