diff --git a/Signal/src/ViewControllers/NewGroupViewController.m b/Signal/src/ViewControllers/NewGroupViewController.m index 47fd241d8..871282ddb 100644 --- a/Signal/src/ViewControllers/NewGroupViewController.m +++ b/Signal/src/ViewControllers/NewGroupViewController.m @@ -130,6 +130,9 @@ const NSUInteger kNewGroupViewControllerAvatarWidth = 68; - (UIView *)firstSectionHeader { UIView *firstSectionHeader = [UIView new]; + firstSectionHeader.userInteractionEnabled = YES; + [firstSectionHeader + addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(headerWasTapped:)]]; firstSectionHeader.backgroundColor = [UIColor whiteColor]; UIView *threadInfoView = [UIView new]; [firstSectionHeader addSubview:threadInfoView]; @@ -168,6 +171,13 @@ const NSUInteger kNewGroupViewControllerAvatarWidth = 68; return firstSectionHeader; } +- (void)headerWasTapped:(UIGestureRecognizer *)sender +{ + if (sender.state == UIGestureRecognizerStateRecognized) { + [self.groupNameTextField becomeFirstResponder]; + } +} + - (void)avatarTouched:(UIGestureRecognizer *)sender { if (sender.state == UIGestureRecognizerStateRecognized) { diff --git a/Signal/src/ViewControllers/UpdateGroupViewController.m b/Signal/src/ViewControllers/UpdateGroupViewController.m index d0b462336..ba200a737 100644 --- a/Signal/src/ViewControllers/UpdateGroupViewController.m +++ b/Signal/src/ViewControllers/UpdateGroupViewController.m @@ -173,6 +173,9 @@ NS_ASSUME_NONNULL_BEGIN OWSAssert(self.thread.groupModel); UIView *firstSectionHeader = [UIView new]; + firstSectionHeader.userInteractionEnabled = YES; + [firstSectionHeader + addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(headerWasTapped:)]]; firstSectionHeader.backgroundColor = [UIColor whiteColor]; UIView *threadInfoView = [UIView new]; [firstSectionHeader addSubview:threadInfoView]; @@ -215,6 +218,13 @@ NS_ASSUME_NONNULL_BEGIN return firstSectionHeader; } +- (void)headerWasTapped:(UIGestureRecognizer *)sender +{ + if (sender.state == UIGestureRecognizerStateRecognized) { + [self.groupNameTextField becomeFirstResponder]; + } +} + - (void)avatarTouched:(UIGestureRecognizer *)sender { if (sender.state == UIGestureRecognizerStateRecognized) {