• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

gitリポジトリのurlを貼り付けるだけでアプリケーションのビルドを実行するアプリ。 macOS用


Commit MetaInfo

Revisiona3d98f58812d5e40a807a0acd0a399c485014bce (tree)
Time2017-08-12 23:59:18
Authormasakih <masakih@user...>
Commitermasakih

Log Message

ソースコードを整理

Change Summary

Incremental Difference

--- a/AppBuilderWithGit/ViewController.swift
+++ b/AppBuilderWithGit/ViewController.swift
@@ -57,7 +57,32 @@ class ViewController: NSViewController {
5757 clone()
5858 }
5959
60- private func clone() {
60+}
61+
62+extension ViewController {
63+
64+ override func controlTextDidChange(_ obj: Notification) {
65+
66+ guard let tx = obj.object as? NSTextField else { return }
67+
68+ if let url = URL(string: tx.stringValue),
69+ let scheme = url.scheme,
70+ (scheme == "git") || (scheme == "http") || (scheme == "https"),
71+ let host = url.host, host != "",
72+ url.path != "/", url.path != "" {
73+
74+ cloneButton.isEnabled = true
75+
76+ } else {
77+
78+ cloneButton.isEnabled = false
79+ }
80+ }
81+}
82+
83+extension ViewController {
84+
85+ fileprivate func clone() {
6186
6287 guard let url = URL(string: urlField.stringValue)
6388 else { return }
@@ -124,24 +149,3 @@ class ViewController: NSViewController {
124149
125150 }
126151
127-
128-extension ViewController {
129-
130- override func controlTextDidChange(_ obj: Notification) {
131-
132- guard let tx = obj.object as? NSTextField else { return }
133-
134- if let url = URL(string: tx.stringValue),
135- let scheme = url.scheme,
136- (scheme == "git") || (scheme == "http") || (scheme == "https"),
137- let host = url.host, host != "",
138- url.path != "/", url.path != "" {
139-
140- cloneButton.isEnabled = true
141-
142- } else {
143-
144- cloneButton.isEnabled = false
145- }
146- }
147-}