forked from vashpan/xcode-dev-cleaner
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
120 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="14865.1" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" initialViewController="lcH-gJ-8Xh"> | ||
<dependencies> | ||
<deployment identifier="macosx"/> | ||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14865.1"/> | ||
<plugIn identifier="com.apple.WebKit2IBPlugin" version="14865.1"/> | ||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> | ||
</dependencies> | ||
<scenes> | ||
<!--Window Controller--> | ||
<scene sceneID="GYz-je-o37"> | ||
<objects> | ||
<windowController showSeguePresentationStyle="single" id="lcH-gJ-8Xh" sceneMemberID="viewController"> | ||
<window key="window" title="DevCleaner Help" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" frameAutosaveName="" animationBehavior="default" tabbingMode="disallowed" id="rLk-dr-8gE"> | ||
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/> | ||
<rect key="contentRect" x="425" y="461" width="600" height="800"/> | ||
<rect key="screenRect" x="0.0" y="0.0" width="2560" height="1417"/> | ||
<value key="minSize" type="size" width="300" height="600"/> | ||
<connections> | ||
<outlet property="delegate" destination="lcH-gJ-8Xh" id="fxE-Ns-1tf"/> | ||
</connections> | ||
</window> | ||
<connections> | ||
<segue destination="3kP-K3-jsn" kind="relationship" relationship="window.shadowedContentViewController" id="iIj-rZ-etA"/> | ||
</connections> | ||
</windowController> | ||
<customObject id="w46-el-tsG" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/> | ||
</objects> | ||
<point key="canvasLocation" x="197" y="-604"/> | ||
</scene> | ||
<!--DevCleaner for Xcode Help--> | ||
<scene sceneID="CjE-oI-EP3"> | ||
<objects> | ||
<viewController title="DevCleaner for Xcode Help" id="3kP-K3-jsn" customClass="HelpViewController" customModule="DevCleaner" customModuleProvider="target" sceneMemberID="viewController"> | ||
<view key="view" id="QZq-ge-LiZ"> | ||
<rect key="frame" x="0.0" y="0.0" width="544" height="477"/> | ||
<autoresizingMask key="autoresizingMask"/> | ||
<subviews> | ||
<wkWebView wantsLayer="YES" translatesAutoresizingMaskIntoConstraints="NO" id="sQ7-Yg-Sup"> | ||
<rect key="frame" x="0.0" y="0.0" width="544" height="477"/> | ||
<wkWebViewConfiguration key="configuration"> | ||
<audiovisualMediaTypes key="mediaTypesRequiringUserActionForPlayback" none="YES"/> | ||
<wkPreferences key="preferences" javaScriptCanOpenWindowsAutomatically="NO" javaScriptEnabled="NO"/> | ||
</wkWebViewConfiguration> | ||
</wkWebView> | ||
</subviews> | ||
<constraints> | ||
<constraint firstAttribute="bottom" secondItem="sQ7-Yg-Sup" secondAttribute="bottom" id="D3s-FZ-H4w"/> | ||
<constraint firstAttribute="trailing" secondItem="sQ7-Yg-Sup" secondAttribute="trailing" id="XQb-Wh-NP1"/> | ||
<constraint firstItem="sQ7-Yg-Sup" firstAttribute="top" secondItem="QZq-ge-LiZ" secondAttribute="top" id="hxT-uQ-LlA"/> | ||
<constraint firstItem="sQ7-Yg-Sup" firstAttribute="leading" secondItem="QZq-ge-LiZ" secondAttribute="leading" id="w7j-6J-Plm"/> | ||
</constraints> | ||
</view> | ||
<connections> | ||
<outlet property="helpWebView" destination="sQ7-Yg-Sup" id="0Dr-Du-CDx"/> | ||
</connections> | ||
</viewController> | ||
<customObject id="8A1-hA-bid" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/> | ||
</objects> | ||
<point key="canvasLocation" x="197" y="343.5"/> | ||
</scene> | ||
</scenes> | ||
</document> |
28 changes: 28 additions & 0 deletions
28
DevCleaner/View Controllers/Help Window/HelpViewController.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// | ||
// HelpViewController.swift | ||
// DevCleaner | ||
// | ||
// Created by Konrad Kołakowski on 07/09/2019. | ||
// Copyright © 2019 One Minute Games. All rights reserved. | ||
// | ||
|
||
import Cocoa | ||
import WebKit | ||
|
||
final class HelpViewController: NSViewController { | ||
// MARK: Properties & outlets | ||
@IBOutlet private weak var helpWebView: WKWebView! | ||
|
||
// MARK: Initialization & overrides | ||
override func viewDidLoad() { | ||
super.viewDidLoad() | ||
|
||
// load manual HTML | ||
guard let helpUrl = Bundle.main.url(forResource: "manual", withExtension: "html", subdirectory: "Manual") else { | ||
log.error("HelpViewController: Can't find manual HTML file!") | ||
return | ||
} | ||
|
||
self.helpWebView.loadFileURL(helpUrl, allowingReadAccessTo: helpUrl.deletingLastPathComponent()) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters