Force modal in modal dialogs to always have full size navigation bars. Issue #1301

This commit is contained in:
Maurice Parker
2019-11-17 09:49:26 -06:00
parent cc93b2f8f1
commit 0e60c19338
4 changed files with 31 additions and 6 deletions

View File

@@ -7,10 +7,10 @@
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--Navigation Controller-->
<!--Modal Navigation Controller-->
<scene sceneID="98f-PW-S1C">
<objects>
<navigationController storyboardIdentifier="AddLocalAccountNavigationViewController" id="TMY-HB-vAu" sceneMemberID="viewController">
<navigationController storyboardIdentifier="AddLocalAccountNavigationViewController" id="TMY-HB-vAu" customClass="ModalNavigationController" customModule="NetNewsWire" customModuleProvider="target" sceneMemberID="viewController">
<navigationBar key="navigationBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="p8g-7e-3f4">
<rect key="frame" x="0.0" y="44" width="414" height="44"/>
<autoresizingMask key="autoresizingMask"/>
@@ -23,10 +23,10 @@
</objects>
<point key="canvasLocation" x="2506" y="-528"/>
</scene>
<!--Navigation Controller-->
<!--Modal Navigation Controller-->
<scene sceneID="6i4-ho-e4F">
<objects>
<navigationController storyboardIdentifier="FeedbinAccountNavigationViewController" id="sFg-MZ-PqJ" sceneMemberID="viewController">
<navigationController storyboardIdentifier="FeedbinAccountNavigationViewController" id="sFg-MZ-PqJ" customClass="ModalNavigationController" customModule="NetNewsWire" customModuleProvider="target" sceneMemberID="viewController">
<navigationBar key="navigationBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="wq6-np-tNn">
<rect key="frame" x="0.0" y="44" width="414" height="44"/>
<autoresizingMask key="autoresizingMask"/>

View File

@@ -117,10 +117,10 @@
</objects>
<point key="canvasLocation" x="-1711.2" y="89.408866995073893"/>
</scene>
<!--Navigation Controller-->
<!--Modal Navigation Controller-->
<scene sceneID="hbe-Yu-anW">
<objects>
<navigationController storyboardIdentifier="AddWebFeedFolderNavViewController" id="WDg-F7-gfk" sceneMemberID="viewController">
<navigationController storyboardIdentifier="AddWebFeedFolderNavViewController" id="WDg-F7-gfk" customClass="ModalNavigationController" customModule="NetNewsWire" customModuleProvider="target" sceneMemberID="viewController">
<navigationBar key="navigationBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="akM-T1-shZ">
<rect key="frame" x="0.0" y="44" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>

View File

@@ -0,0 +1,21 @@
//
// ModalNavigationController.swift
// NetNewsWire-iOS
//
// Created by Maurice Parker on 11/16/19.
// Copyright © 2019 Ranchero Software. All rights reserved.
//
import UIKit
class ModalNavigationController: UINavigationController {
override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()
// This hack is to resolve https://github.com/brentsimmons/NetNewsWire/issues/1301
let frame = navigationBar.frame
navigationBar.frame = CGRect(x: frame.minX, y: frame.minY, width: frame.size.width, height: 64.0)
}
}