Skip to content

Commit

Permalink
Fixed UI issues
Browse files Browse the repository at this point in the history
  • Loading branch information
vGubriienko committed Jan 28, 2022
1 parent b568c75 commit 986454d
Show file tree
Hide file tree
Showing 7 changed files with 68 additions and 45 deletions.
4 changes: 1 addition & 3 deletions netfox.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
B3F8BA9A1C833ABC00F9FBEA /* NFXProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3F8BA7D1C833ABC00F9FBEA /* NFXProtocol.swift */; };
B3F8BA9B1C833ABC00F9FBEA /* NFXProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3F8BA7D1C833ABC00F9FBEA /* NFXProtocol.swift */; };
B3F8BA9C1C833ABC00F9FBEA /* NFXRawBodyDetailsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3F8BA7E1C833ABC00F9FBEA /* NFXRawBodyDetailsController.swift */; };
B3F8BA9D1C833ABC00F9FBEA /* NFXRawBodyDetailsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3F8BA7E1C833ABC00F9FBEA /* NFXRawBodyDetailsController.swift */; };
B3F8BA9E1C833ABC00F9FBEA /* NFXSettingsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3F8BA7F1C833ABC00F9FBEA /* NFXSettingsController.swift */; };
B3F8BA9F1C833ABC00F9FBEA /* NFXSettingsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3F8BA7F1C833ABC00F9FBEA /* NFXSettingsController.swift */; };
B3F8BAA01C833ABC00F9FBEA /* NFXStatisticsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3F8BA801C833ABC00F9FBEA /* NFXStatisticsController.swift */; };
Expand Down Expand Up @@ -234,7 +233,6 @@
B3F8BA7B1C833ABC00F9FBEA /* NFXInfoController.swift */,
B3F8BA7C1C833ABC00F9FBEA /* NFXListController.swift */,
B3F8BA7D1C833ABC00F9FBEA /* NFXProtocol.swift */,
B3F8BA7E1C833ABC00F9FBEA /* NFXRawBodyDetailsController.swift */,
B3F8BA7F1C833ABC00F9FBEA /* NFXSettingsController.swift */,
B3F8BA801C833ABC00F9FBEA /* NFXStatisticsController.swift */,
B3F8BA811C833ABC00F9FBEA /* NFXWindowController.swift */,
Expand All @@ -246,6 +244,7 @@
isa = PBXGroup;
children = (
3708AD5922D4A9DD0050DB7D /* NFXURLDetailsControllerViewController.swift */,
B3F8BA7E1C833ABC00F9FBEA /* NFXRawBodyDetailsController.swift */,
B3F8BAA51C833AC700F9FBEA /* NFXDetailsController_iOS.swift */,
B3F8BAA61C833AC700F9FBEA /* NFXHelper_iOS.swift */,
B3F8BAA71C833AC700F9FBEA /* NFXInfoController_iOS.swift */,
Expand Down Expand Up @@ -506,7 +505,6 @@
B3F8BA931C833ABC00F9FBEA /* NFXHTTPModelManager.swift in Sources */,
B3F8BA891C833ABC00F9FBEA /* NFXDetailsController.swift in Sources */,
B3F8BA991C833ABC00F9FBEA /* NFXListController.swift in Sources */,
B3F8BA9D1C833ABC00F9FBEA /* NFXRawBodyDetailsController.swift in Sources */,
B3F8D6801C833B1700F9FBEA /* NFXListController_OSX.swift in Sources */,
B3F8BA971C833ABC00F9FBEA /* NFXInfoController.swift in Sources */,
);
Expand Down
15 changes: 14 additions & 1 deletion netfox/Core/NFX.swift
Original file line number Diff line number Diff line change
Expand Up @@ -274,9 +274,22 @@ extension NFX {
navigationController.navigationBar.titleTextAttributes = [.foregroundColor: UIColor.NFXOrangeColor()]

if #available(iOS 13.0, *) {
let appearence = UINavigationBarAppearance()

appearence.configureWithOpaqueBackground()
appearence.backgroundColor = UIColor.NFXStarkWhiteColor()
appearence.titleTextAttributes = [.foregroundColor: UIColor.black]

navigationController.navigationBar.standardAppearance = appearence
navigationController.navigationBar.scrollEdgeAppearance = appearence

if #available(iOS 15.0, *) {
navigationController.navigationBar.compactScrollEdgeAppearance = appearence
}

navigationController.presentationController?.delegate = self
}

rootViewController?.present(navigationController, animated: true, completion: nil)
navigationViewController = navigationController
}
Expand Down
34 changes: 17 additions & 17 deletions netfox/OSX/NetfoxWindow.xib
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,11 @@
</tableView>
</subviews>
</clipView>
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="YES" id="yOp-XJ-VEZ">
<scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="yOp-XJ-VEZ">
<rect key="frame" x="1" y="7" width="0.0" height="16"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="NO" id="X3x-Ae-X1t">
<scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="NO" id="X3x-Ae-X1t">
<rect key="frame" x="224" y="17" width="15" height="102"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
Expand Down Expand Up @@ -218,7 +218,7 @@
</textView>
</subviews>
</clipView>
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="YES" id="EAa-Kn-sQw">
<scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="YES" id="EAa-Kn-sQw">
<rect key="frame" x="-100" y="-100" width="87" height="18"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
Expand Down Expand Up @@ -258,11 +258,11 @@
</textView>
</subviews>
</clipView>
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="YES" id="8dk-Ox-ZtJ">
<scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="YES" id="8dk-Ox-ZtJ">
<rect key="frame" x="-100" y="-100" width="87" height="18"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<scroller key="verticalScroller" verticalHuggingPriority="750" doubleValue="1" horizontal="NO" id="1vA-Uu-d6q">
<scroller key="verticalScroller" wantsLayer="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="NO" id="1vA-Uu-d6q">
<rect key="frame" x="281" y="1" width="15" height="228"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
Expand Down Expand Up @@ -298,11 +298,11 @@
</textView>
</subviews>
</clipView>
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="YES" id="mfi-Mx-WwV">
<scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="YES" id="mfi-Mx-WwV">
<rect key="frame" x="-100" y="-100" width="87" height="18"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<scroller key="verticalScroller" verticalHuggingPriority="750" doubleValue="1" horizontal="NO" id="xVE-bp-Yt9">
<scroller key="verticalScroller" wantsLayer="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="NO" id="xVE-bp-Yt9">
<rect key="frame" x="466" y="1" width="15" height="328"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
Expand Down Expand Up @@ -338,11 +338,11 @@
</textView>
</subviews>
</clipView>
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="YES" id="Q5U-dM-FMB">
<scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="YES" id="Q5U-dM-FMB">
<rect key="frame" x="-100" y="-100" width="87" height="18"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<scroller key="verticalScroller" verticalHuggingPriority="750" doubleValue="1" horizontal="NO" id="0rI-qV-O0B">
<scroller key="verticalScroller" wantsLayer="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="NO" id="0rI-qV-O0B">
<rect key="frame" x="260" y="1" width="15" height="228"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
Expand Down Expand Up @@ -378,11 +378,11 @@
</textView>
</subviews>
</clipView>
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="YES" id="s5H-DE-qRZ">
<scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="YES" id="s5H-DE-qRZ">
<rect key="frame" x="-100" y="-100" width="87" height="18"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<scroller key="verticalScroller" verticalHuggingPriority="750" doubleValue="1" horizontal="NO" id="58D-aT-X9b">
<scroller key="verticalScroller" wantsLayer="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="NO" id="58D-aT-X9b">
<rect key="frame" x="466" y="1" width="15" height="328"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
Expand Down Expand Up @@ -522,11 +522,11 @@
<constraints>
<constraint firstAttribute="height" constant="144" id="ycu-zB-eWM"/>
</constraints>
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="YES" id="aeX-Hc-ElD">
<scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="aeX-Hc-ElD">
<rect key="frame" x="1" y="124" width="212" height="16"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="NO" id="85c-W9-JQS">
<scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="NO" id="85c-W9-JQS">
<rect key="frame" x="224" y="17" width="15" height="102"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
Expand Down Expand Up @@ -641,11 +641,11 @@
<constraint firstAttribute="width" constant="250" id="bkt-rY-H6b"/>
<constraint firstAttribute="height" constant="250" id="wgY-uM-uZr"/>
</constraints>
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="YES" id="B3w-qf-zqN">
<scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="YES" id="B3w-qf-zqN">
<rect key="frame" x="-100" y="-100" width="87" height="18"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<scroller key="verticalScroller" verticalHuggingPriority="750" doubleValue="1" horizontal="NO" id="eqr-u6-Tlv">
<scroller key="verticalScroller" wantsLayer="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="NO" id="eqr-u6-Tlv">
<rect key="frame" x="234" y="1" width="15" height="248"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
Expand Down Expand Up @@ -695,11 +695,11 @@
<constraint firstAttribute="width" constant="250" id="QkS-pD-nsl"/>
<constraint firstAttribute="height" constant="250" id="VVg-Q3-hYa"/>
</constraints>
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="YES" id="fTo-XG-tQx">
<scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="YES" id="fTo-XG-tQx">
<rect key="frame" x="-100" y="-100" width="87" height="18"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<scroller key="verticalScroller" verticalHuggingPriority="750" doubleValue="1" horizontal="NO" id="1oO-uN-Zik">
<scroller key="verticalScroller" wantsLayer="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="NO" id="1oO-uN-Zik">
<rect key="frame" x="234" y="1" width="15" height="248"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
Expand Down
7 changes: 6 additions & 1 deletion netfox/iOS/NFXListController_iOS.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,19 @@ import UIKit


class NFXListController_iOS: NFXListController, UITableViewDelegate, UITableViewDataSource, UISearchResultsUpdating, UISearchControllerDelegate, DataCleaner {

// MARK: Properties

var tableView = UITableView()
var tableView = UITableView(frame: .zero, style: .grouped)
var searchController: UISearchController!

// MARK: View Life Cycle

override func viewDidLoad() {
super.viewDidLoad()

title = "Requests"

edgesForExtendedLayout = UIRectEdge.all
extendedLayoutIncludesOpaqueBars = true
automaticallyAdjustsScrollViewInsets = false
Expand All @@ -30,6 +33,8 @@ class NFXListController_iOS: NFXListController, UITableViewDelegate, UITableView
tableView.translatesAutoresizingMaskIntoConstraints = true
tableView.delegate = self
tableView.dataSource = self
tableView.backgroundColor = .white
tableView.separatorInset = .zero
view.addSubview(self.tableView)

tableView.register(NFXListCell.self, forCellReuseIdentifier: NSStringFromClass(NFXListCell.self))
Expand Down
7 changes: 5 additions & 2 deletions netfox/iOS/NFXSettingsController_iOS.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import MessageUI

class NFXSettingsController_iOS: NFXSettingsController, UITableViewDelegate, UITableViewDataSource, MFMailComposeViewControllerDelegate, DataCleaner {

var tableView: UITableView = UITableView()
var tableView: UITableView = UITableView(frame: .zero, style: .grouped)

// MARK: View Life Cycle

Expand All @@ -38,6 +38,8 @@ class NFXSettingsController_iOS: NFXSettingsController, UITableViewDelegate, UIT
tableView.dataSource = self
tableView.alwaysBounceVertical = false
tableView.backgroundColor = UIColor.clear
tableView.separatorInset = .zero

tableView.tableFooterView = UIView(frame: CGRect.zero)
tableView.tableFooterView?.isHidden = true
view.addSubview(tableView)
Expand Down Expand Up @@ -99,7 +101,9 @@ class NFXSettingsController_iOS: NFXSettingsController, UITableViewDelegate, UIT
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = UITableViewCell()
cell.textLabel?.font = UIFont.NFXFont(size: 14)
cell.textLabel?.textColor = .black
cell.tintColor = UIColor.NFXOrangeColor()
cell.backgroundColor = .white

switch indexPath.section {
case 0:
Expand Down Expand Up @@ -135,7 +139,6 @@ class NFXSettingsController_iOS: NFXSettingsController, UITableViewDelegate, UIT
default: return UITableViewCell()

}

}

func numberOfSections(in tableView: UITableView) -> Int {
Expand Down
Loading

0 comments on commit 986454d

Please sign in to comment.