Bug Fix - Authentication: The Bottom area of the reCaptcha is not clickable.

This commit is contained in:
giomfo
2016-05-27 14:24:35 +02:00
parent e3d10cba2e
commit f170a7a1c6
2 changed files with 30 additions and 9 deletions
@@ -156,11 +156,7 @@
// Restore here the actual content view height.
// Indeed this height has been modified according to the authInputsView height in the default implementation of MXKAuthenticationViewController.
self.contentViewHeightConstraint.constant = 415;
if (self.serverOptionsContainer.isHidden == NO)
{
self.contentViewHeightConstraint.constant += self.serverOptionsContainer.frame.size.height;
}
[self refreshContentViewHeightConstraint];
}
- (void)setUserInteractionEnabled:(BOOL)userInteractionEnabled
@@ -168,7 +164,12 @@
super.userInteractionEnabled = userInteractionEnabled;
// Show/Hide server options
_optionsContainer.hidden = !userInteractionEnabled;
if (_optionsContainer.hidden == userInteractionEnabled)
{
_optionsContainer.hidden = !userInteractionEnabled;
[self refreshContentViewHeightConstraint];
}
// Update the label of the right bar button according to its actual action.
if (!userInteractionEnabled)
@@ -334,6 +335,23 @@
#pragma mark -
- (void)refreshContentViewHeightConstraint
{
// Refresh content view height by considering the options container display.
CGRect serverOptionsContainerFrame = self.serverOptionsContainer.frame;
self.contentViewHeightConstraint.constant = self.optionsContainer.frame.origin.y + 10;
if (!self.optionsContainer.isHidden)
{
self.contentViewHeightConstraint.constant += serverOptionsContainerFrame.origin.y;
if (!self.serverOptionsContainer.isHidden)
{
self.contentViewHeightConstraint.constant += serverOptionsContainerFrame.size.height;
}
}
}
- (void)hideServerOptionsContainer:(BOOL)hidden
{
if (self.serverOptionsContainer.isHidden == hidden)
@@ -413,11 +431,13 @@
// Override here the handling of the authInputsView height change.
if ([@"viewHeightConstraint.constant" isEqualToString:keyPath])
{
// Contrary to the default implementation in 'MXKAuthenticationViewController', the content view height must not be updated.
self.authInputContainerViewHeightConstraint.constant = self.authInputsView.viewHeightConstraint.constant;
// Force to render the view
[self.view layoutIfNeeded];
// Refresh content view height by considering the updated frame of the options container.
[self refreshContentViewHeightConstraint];
}
else
{
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="10116" systemVersion="15C50" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
@@ -306,8 +306,9 @@
<constraints>
<constraint firstAttribute="height" constant="415" id="6v6-fz-e8o"/>
<constraint firstItem="Gg0-TE-OGb" firstAttribute="width" secondItem="rhx-dD-4EJ" secondAttribute="width" id="EBX-KN-pRT"/>
<constraint firstItem="Gg0-TE-OGb" firstAttribute="top" secondItem="rhx-dD-4EJ" secondAttribute="top" constant="300" id="UEM-Mh-0H9"/>
<constraint firstItem="Gg0-TE-OGb" firstAttribute="top" secondItem="rhx-dD-4EJ" secondAttribute="top" priority="250" constant="300" id="UEM-Mh-0H9"/>
<constraint firstItem="xWb-IJ-v7F" firstAttribute="leading" secondItem="rhx-dD-4EJ" secondAttribute="leading" id="YnP-Nk-QxR"/>
<constraint firstItem="Gg0-TE-OGb" firstAttribute="top" relation="greaterThanOrEqual" secondItem="xWb-IJ-v7F" secondAttribute="bottom" id="aGH-m3-xL3"/>
<constraint firstAttribute="width" constant="600" placeholder="YES" id="hOT-Wn-hIb"/>
<constraint firstAttribute="trailing" secondItem="xWb-IJ-v7F" secondAttribute="trailing" id="hko-ol-XDd"/>
<constraint firstItem="xWb-IJ-v7F" firstAttribute="top" secondItem="rhx-dD-4EJ" secondAttribute="top" constant="76" id="khR-Uj-OTH"/>