Fix landscape layout.
[FIXED] View layout problems while in landscape. - #MP-8 fixed
This commit is contained in:
		@@ -52,6 +52,12 @@
 | 
			
		||||
    return [[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad || interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
 | 
			
		||||
    
 | 
			
		||||
    [self setHelpHidden:![self isHelpVisible] animated:NO];
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
 | 
			
		||||
    
 | 
			
		||||
    if ([[segue identifier] isEqualToString:@"MP_Main_ChooseType"])
 | 
			
		||||
@@ -183,7 +189,7 @@
 | 
			
		||||
 | 
			
		||||
- (BOOL)isHelpVisible {
 | 
			
		||||
    
 | 
			
		||||
    return self.helpContainer.frame.origin.y < 400;
 | 
			
		||||
    return self.helpContainer.frame.origin.y == 216;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
- (void)toggleHelpAnimated:(BOOL)animated {
 | 
			
		||||
@@ -194,10 +200,9 @@
 | 
			
		||||
- (void)setHelpHidden:(BOOL)hidden animated:(BOOL)animated {
 | 
			
		||||
    
 | 
			
		||||
    [UIView animateWithDuration:animated? 0.3f: 0 animations:^{
 | 
			
		||||
        
 | 
			
		||||
        if (hidden) {
 | 
			
		||||
            self.contentContainer.frame = CGRectSetHeight(self.contentContainer.frame, 373);
 | 
			
		||||
            self.helpContainer.frame = CGRectSetY(self.helpContainer.frame, 416);
 | 
			
		||||
            self.contentContainer.frame = CGRectSetHeight(self.contentContainer.frame, self.view.bounds.size.height - 44);
 | 
			
		||||
            self.helpContainer.frame = CGRectSetY(self.helpContainer.frame, self.view.bounds.size.height);
 | 
			
		||||
            [MPConfig get].helpHidden = [NSNumber numberWithBool:YES];
 | 
			
		||||
        } else {
 | 
			
		||||
            self.contentContainer.frame = CGRectSetHeight(self.contentContainer.frame, 175);
 | 
			
		||||
 
 | 
			
		||||
@@ -370,7 +370,7 @@ The passwords aren't saved anywhere.  This is a major advantage: if you loose yo
 | 
			
		||||
                                    </button>
 | 
			
		||||
                                    <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" alpha="0.50000000000000011" contentMode="left" text="apple.com" lineBreakMode="tailTruncation" minimumFontSize="10" id="gSK-aB-wNI">
 | 
			
		||||
                                        <rect key="frame" x="25" y="20" width="270" height="26"/>
 | 
			
		||||
                                        <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
 | 
			
		||||
                                        <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
 | 
			
		||||
                                        <fontDescription key="fontDescription" name="Copperplate" family="Copperplate" pointSize="12"/>
 | 
			
		||||
                                        <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
 | 
			
		||||
                                        <nil key="highlightedColor"/>
 | 
			
		||||
@@ -379,7 +379,7 @@ The passwords aren't saved anywhere.  This is a major advantage: if you loose yo
 | 
			
		||||
                                    </label>
 | 
			
		||||
                                    <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" text="S3cre7^Pa$swcrD" textAlignment="center" minimumFontSize="17" clearButtonMode="whileEditing" id="fiX-10-fif">
 | 
			
		||||
                                        <rect key="frame" x="20" y="46" width="280" height="60"/>
 | 
			
		||||
                                        <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
 | 
			
		||||
                                        <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
 | 
			
		||||
                                        <color key="textColor" red="0.47450980390000003" green="0.86666666670000003" blue="0.98431372549999996" alpha="1" colorSpace="calibratedRGB"/>
 | 
			
		||||
                                        <fontDescription key="fontDescription" name="Copperplate-Bold" family="Copperplate" pointSize="26"/>
 | 
			
		||||
                                        <textInputTraits key="textInputTraits" autocorrectionType="no"/>
 | 
			
		||||
@@ -453,15 +453,15 @@ The passwords aren't saved anywhere.  This is a major advantage: if you loose yo
 | 
			
		||||
                                                <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
 | 
			
		||||
                                            </imageView>
 | 
			
		||||
                                            <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Tap        to set a password." textAlignment="center" lineBreakMode="tailTruncation" minimumFontSize="10" id="ieN-QQ-PyR">
 | 
			
		||||
                                                <rect key="frame" x="20" y="0.0" width="170" height="40"/>
 | 
			
		||||
                                                <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
 | 
			
		||||
                                                <rect key="frame" x="20" y="0.0" width="171" height="40"/>
 | 
			
		||||
                                                <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
 | 
			
		||||
                                                <fontDescription key="fontDescription" type="system" pointSize="14"/>
 | 
			
		||||
                                                <color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/>
 | 
			
		||||
                                                <nil key="highlightedColor"/>
 | 
			
		||||
                                            </label>
 | 
			
		||||
                                            <imageView userInteractionEnabled="NO" contentMode="scaleToFill" image="icon_edit.png" id="KEn-n3-qhX">
 | 
			
		||||
                                                <rect key="frame" x="48" y="6" width="24" height="24"/>
 | 
			
		||||
                                                <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
 | 
			
		||||
                                                <rect key="frame" x="48" y="8" width="24" height="24"/>
 | 
			
		||||
                                                <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
 | 
			
		||||
                                            </imageView>
 | 
			
		||||
                                        </subviews>
 | 
			
		||||
                                        <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user