Open in app

Sign In

Write

Sign In

Stephen Huang
Stephen Huang

15 Followers

Home

About

Published in

彼得潘的 Swift iOS App 開發教室

·May 26

#30 SwiftSoup 解析HTML

SwiftSoup 是一個很方便的swift library,用來解析HTML。 GitHub - scinfu/SwiftSoup: SwiftSoup: Pure Swift HTML Parser, with best of DOM, CSS, and jquery… SwiftSoup: Pure Swift HTML Parser, with best of DOM, CSS, and jquery (Supports Linux, iOS, Mac, tvOS, watchOS) - GitHub…github.com 一、建立URLRequest if let url = URL(string: "網址") { let request = URLRequest(url: url) } 二、取得網址內的html let task = URLSession.shared.dataTask( …

Swift

3 min read

Swift

3 min read


Published in

彼得潘的 Swift iOS App 開發教室

·Jan 18

Git — Mac 遷移/移動git專案到新網址

在Mac環境下如何將 git 專案移動到新的git網址? 一定要先確定專案已經clone到電腦中!! 避免git失敗或錯誤資料遺失,請一定要備份。 在終端機terminal內 cd 移動到專案資料夾後: 查看專案的遠端位置 $ git remote -v 2. 指定新的位置 $ git remote set-url origin 新遠端位置(網址) 3. 若新的遠端位置沒有任何commit,就可以直接push上去,完成。 但是! 如果在新遠端位置url已經有commit 的時候,會出現錯誤「fatal: refusing to merge unrelated histories」 How to fix 'fatal: refusing to merge unrelated histories' Git error The fatal: refusing to merge histories error is a fairly common Git error. It appears when a developer tries to merge…komodor.com

Git

2 min read

Git

2 min read


Published in

彼得潘的 Swift iOS App 開發教室

·Dec 12, 2022

#28 Swift — 各式 keyboardType 圖示

Swift 的 UITextField 之 UIKeyboardType 圖示。 以下展現每個鍵盤種類在模擬器上的畫面截圖,共12種: 1 — default 2 — asciiCapable

Swift

2 min read

#28 Swift — 各式  keyboardType  圖示
#28 Swift — 各式  keyboardType  圖示
Swift

2 min read


Published in

彼得潘的 Swift iOS App 開發教室

·Dec 2, 2022

#27 Swift — macOS 跳出 NSAlert 視窗

創造一個 macOS 專案,Xcode會import Cocoa, 而非平常熟悉的UIKit 在這個Cocoa裡面,他的警告視窗是NSAlert Apple Developer Documentation Edit descriptiondeveloper.apple.com 一、那如何呼叫NSAlert呢 let alertController = NSAlert() // 設置警告圖案 alertController.icon = NSImage(systemSymbolName: " …

Nsalert

4 min read

#27 Swift — macOS 跳出 NSAlert 視窗
#27 Swift — macOS 跳出 NSAlert 視窗
Nsalert

4 min read


Published in

彼得潘的 Swift iOS App 開發教室

·Nov 3, 2022

Xcode tips 實用編輯按鍵

統整Xcode 常用的快速鍵使用方式 一、鍵盤快速鍵 1「control + shift + 滑鼠點擊」 => 指定多個輸入點。 2「option + 滑鼠拖曳」 => 已矩形方式選取文字。 3「cmd + control + E」 => 選取所有同參數/變數。 4「control + I」 => 反白區域自動整理縮排。 5程式中輸入「#warning」,可顯示醒目的黃色錯誤提醒。輸入 「#error」,則會出現紅色錯誤,不解決就不能Build。 6「cmd + shift + K」 => Clean 所有錯誤 7「cmd + B」 => 快速Build,try error。 8「cmd + shift + O」 => 快速搜尋並開啟選定的頁面。 9「cmd + option + /」 => 為function自動生成註解(在指定function 上方一行使用)。 10 「option + 編輯器右上圖示」=> 可向右或向下多加一個顯示頁面。

Xcode

3 min read

Xcode tips 實用編輯按鍵
Xcode tips 實用編輯按鍵
Xcode

3 min read


Oct 22, 2022

#26 Swift — UITabBarController外觀(item, tintColor, badge, TextAttribute)

對swift原生UITabBarController的研究。 Xcode版本:13.2.1, iOS版本支援13以上。 UITabBarController 為一個TabBarController及底下的item組成, 每個item可連接到一個ViewController(也可以是UITableViewController之類的)。 我們將三個畫面都連接到各自的controller,並命名為 TabBarViewController TabItem1ViewController TabItem2ViewController

Uitabbarcontroller

5 min read

#26 Swift — UITabBarController外觀(item, tintColor, badge, TextAttribute)
#26 Swift — UITabBarController外觀(item, tintColor, badge, TextAttribute)
Uitabbarcontroller

5 min read


Published in

彼得潘的 Swift iOS App 開發教室

·Aug 24, 2022

#25 Swift — UITextField 更改 placeholder 的文字顏色及背景顏色

在swift 創造一個 UITextField的元件 可以直接在右邊側欄設定他的placeholder 但是在側邊欄沒有placeholder的設定欄位 他的預設值一直都是淺灰色的

Swift

2 min read

Swift

2 min read


Apr 29, 2022

#24 怎麼開發app,同時使用在iOS13 及更早的版本

因為iOS 13 新增了 SceneDelegate的頁面,導致我想在app開發時相容更舊的iOS版本,Xcode就會無情的跳出錯誤。 那應該怎麼修復他們呢? 一、依錯誤提示,在AppDelegate, SceneDelegate加入@available(iOS 13.0, *)

Swift

2 min read

#24 怎麼開發app,同時使用在iOS13 及更早的版本
#24 怎麼開發app,同時使用在iOS13 及更早的版本
Swift

2 min read


Mar 17, 2022

2022–03–17亥時

今日有人問我,你在做什麼的時候最有成就感? 我想了想,發現並不是在coding的時候。 我覺得寫code就像寫作文, 可完成一篇文章,會給我帶來成就感; 但寫code,卻不會。 現在的我寫的程式,就像小學生的作文, 看著前後文,你能大略讀懂他的意思,但沒什麼文法可言, 用詞也非常稚嫩。 如若有朝一日,我的程式碼也能有點詞藻,語句通順,用詞精準 搭配花花綠綠的介面,完美的測試, 那時一定特別的有成就感!說不準連自己都忍不住來回多望幾眼呢! 期許 更上層樓。3/17有感而發。

1 min read

2022–03–17亥時
2022–03–17亥時

1 min read


Feb 1, 2022

#23 UIScrollView layout programming/coding without storyboard

How to set contents that can make a UIScrollView’s scroll area autoresizing. A UIScrollView consists of a content layout guide a frame layout guide Frame layout is what size that UIScrollView show on the view. Content layout is that scroll area really size. Create UIScrollView var testScrollView: UIScrollView = { …

Swift

2 min read

#23 UIScrollView layout programming/coding without storyboard
#23 UIScrollView layout programming/coding without storyboard
Swift

2 min read

Stephen Huang

Stephen Huang

15 Followers

Wish me luck on the way become iOS app developer!

Following
  • Robert Lee

    Robert Lee

  • 彼得潘的 iOS App Neverland

    彼得潘的 iOS App Neverland

  • Michal Malewicz

    Michal Malewicz

  • Michael Long

    Michael Long

  • Netflix Technology Blog

    Netflix Technology Blog

See all (41)

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Text to speech

Teams