From fe19054d630846d2a78684dbe3389c6266d201cb Mon Sep 17 00:00:00 2001 From: Marius Serban Date: Mon, 23 Nov 2020 14:18:47 +0000 Subject: [PATCH] fix bug related to textfield not being focusable --- ResearchKit/Common/ORKChoiceViewCell.m | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ResearchKit/Common/ORKChoiceViewCell.m b/ResearchKit/Common/ORKChoiceViewCell.m index 73ae5bdced..bee38d15db 100644 --- a/ResearchKit/Common/ORKChoiceViewCell.m +++ b/ResearchKit/Common/ORKChoiceViewCell.m @@ -179,7 +179,7 @@ - (void)setupContainerView { if (!_containerView) { _containerView = [UIView new]; } - [self addSubview:_containerView]; + [self.contentView addSubview:_containerView]; } - (void)addContainerViewToSelfConstraints { @@ -187,21 +187,21 @@ - (void)addContainerViewToSelfConstraints { [NSLayoutConstraint constraintWithItem:_containerView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual - toItem:self + toItem:self.contentView attribute:NSLayoutAttributeTop multiplier:1.0 constant:0], [NSLayoutConstraint constraintWithItem:_containerView attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual - toItem:self + toItem:self.contentView attribute:NSLayoutAttributeLeft multiplier:1.0 constant:_leftRightMargin], [NSLayoutConstraint constraintWithItem:_containerView attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual - toItem:self + toItem:self.contentView attribute:NSLayoutAttributeRight multiplier:1.0 constant:-_leftRightMargin] @@ -291,7 +291,7 @@ - (void)setupConstraints { [self addDetailLabelConstraints]; [self addCheckViewToContainerViewConstraints]; [self addContainerViewBottomConstraint]; - [_containerConstraints addObject:[NSLayoutConstraint constraintWithItem:self + [_containerConstraints addObject:[NSLayoutConstraint constraintWithItem:self.contentView attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:_containerView