Skip to content

Commit

Permalink
Refactored.
Browse files Browse the repository at this point in the history
  • Loading branch information
will-lumley committed Dec 6, 2020
1 parent f666893 commit 5d1e4b4
Show file tree
Hide file tree
Showing 34 changed files with 1,101 additions and 1,004 deletions.
2 changes: 1 addition & 1 deletion Example/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ SPEC CHECKSUMS:

PODFILE CHECKSUM: 96c61efa17d3058e833c2604cf2b449c1d44fa8f

COCOAPODS: 1.8.4
COCOAPODS: 1.10.0
2 changes: 1 addition & 1 deletion Example/Pods/Manifest.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

581 changes: 298 additions & 283 deletions Example/Pods/Pods.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion Example/RichEditor.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0900;
LastUpgradeCheck = 1130;
LastUpgradeCheck = 1220;
ORGANIZATIONNAME = CocoaPods;
TargetAttributes = {
ED83F67720348A760038D96B = {
Expand Down Expand Up @@ -379,6 +379,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
Expand Down Expand Up @@ -438,6 +439,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1130"
LastUpgradeVersion = "1220"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
26 changes: 13 additions & 13 deletions Example/RichEditor/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ class ViewController: NSViewController
@IBOutlet weak var fontSizePopUpButton: NSPopUpButton!

///This window displays the HTML, that was sourced from the RichEditor.html() function
fileprivate var previewTextViewController : PreviewTextViewController?
private var previewTextViewController : PreviewTextViewController?

///This window displays the NSAttributedString, that was sourced from HTML
fileprivate var previewTextViewController2: PreviewTextViewController?
private var previewTextViewController2: PreviewTextViewController?

///This window displays the HTML from the RawHTML
fileprivate var previewWebViewController: PreviewWebViewController?
private var previewWebViewController: PreviewWebViewController?

//MARK: - NSViewController
deinit
Expand Down Expand Up @@ -64,7 +64,7 @@ class ViewController: NSViewController
}
}

fileprivate func configureUI()
private func configureUI()
{
//self.textColourButton.delegate = self
//self.highlightColourButton.delegate = self
Expand Down Expand Up @@ -209,12 +209,12 @@ extension ViewController: RichEditorDelegate
//MARK: - Functions
extension ViewController
{
fileprivate func configureTextActionButtonsUI()
private func configureTextActionButtonsUI()
{
let fontStyling = self.richEditor.fontStyling

//Configure the Bold UI
switch (fontStyling.boldTrait()) {
switch (fontStyling.boldTrait) {
case .hasTrait:
self.boldButton.title = "Unbold"

Expand All @@ -226,7 +226,7 @@ extension ViewController
}

//Configure the Italic UI
switch (fontStyling.italicsTrait()) {
switch (fontStyling.italicsTrait) {
case .hasTrait:
self.italicsButton.title = "Unitalic"

Expand All @@ -238,7 +238,7 @@ extension ViewController
}

//Configure the Underline UI
switch (fontStyling.underlineTrait()) {
switch (fontStyling.underlineTrait) {
case .hasTrait:
self.underlineButton.title = "Un-underline"

Expand All @@ -250,7 +250,7 @@ extension ViewController
}

//Configure the Strikethrough UI
switch (fontStyling.strikethroughTrait()) {
switch (fontStyling.strikethroughTrait) {
case .hasTrait:
self.strikeButton.title = "Un-strikethrough"

Expand Down Expand Up @@ -310,7 +310,7 @@ extension ViewController

}

fileprivate func openPreviewTextWindow()
private func openPreviewTextWindow()
{
let storyboardID = NSStoryboard.SceneIdentifier("PreviewWindowController")
let previewWindowController = self.storyboard!.instantiateController(withIdentifier: storyboardID) as! NSWindowController
Expand All @@ -320,7 +320,7 @@ extension ViewController
self.previewTextViewController = previewWindowController.contentViewController as? PreviewTextViewController
}

fileprivate func openPreviewWebWindow()
private func openPreviewWebWindow()
{
let storyboardID = NSStoryboard.SceneIdentifier("PreviewWebWindowController")
let previewWindowController = self.storyboard!.instantiateController(withIdentifier: storyboardID) as! NSWindowController
Expand All @@ -330,7 +330,7 @@ extension ViewController
self.previewWebViewController = previewWindowController.contentViewController as? PreviewWebViewController
}

fileprivate func openPreviewTextWindow2()
private func openPreviewTextWindow2()
{
let storyboardID = NSStoryboard.SceneIdentifier("PreviewWindowController")
let previewWindowController = self.storyboard!.instantiateController(withIdentifier: storyboardID) as! NSWindowController
Expand All @@ -344,7 +344,7 @@ extension ViewController
Grabs the selected font title and the selected font size, creates an instance of NSFont from them
and applies it to the RichTextView
*/
fileprivate func applyFont()
private func applyFont()
{
guard let selectedFontNameMenuItem = self.fontFamiliesPopUpButton.selectedItem else {
return
Expand Down
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 5d1e4b4

Please sign in to comment.