added accessibility ids to HomeViewController and ProfileViewController

pull/2/head
Nancy Mast 6 years ago committed by Matthew Chen
parent d76fac1096
commit 189bbb9f16

@ -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

@ -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,

Loading…
Cancel
Save