let alertController = UIAlertController(
title: “提示”,
message: “請輸入價格或數量”,
preferredStyle: .alert)
// 建立[確認]按鈕
let okAction = UIAlertAction(
title: “確認”,
style: .default,
handler: {
(action: UIAlertAction!) -> Void in
print(“按下確認後的動作”)
})
let alertController = UIAlertController(
title: “提示”,
message: “請輸入價格或數量”,
preferredStyle: .alert)
// 建立[確認]按鈕
let okAction = UIAlertAction(
title: “確認”,
style: .default,
handler: {
(action: UIAlertAction!) -> Void in
print(“按下確認後的動作”)
})
try! db?.run(users.create(ifNotExists: true, block: { (table) in
table.column(id, primaryKey: true)
table.column(price)
table.column(product)
table.column(date)
table.column(amount)
}))
這所有都在mac cmd執行
也就是終端機
首先cd到你要安裝的專案
“`
cd ~/Desktop/git/Chuhuo/Chuhuo
“`
也可以直接拉進去資料夾
var testStr:String?
testStr = “測試”
print(testStr!)
String + String + String
“` swift
print(helloString + “+” + worldString)
// -> hello+world
“`
let helloIndex = cutString.index(cutString.startIndex, offsetBy: 5)
print(String(cutString.suffix(from: helloIndex)))
// -> ” world”
print(String(cutString.prefix(upTo: helloIndex)))
// -> “hello”
1.到這裡下載缺失的iOS版本:
https://github.com/filsv/iPhoneOSDeviceSupport
2.關閉 Xcode
3.解壓縮Zip
4.前往資料夾:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/
5.複製壓縮資料夾進去
6.重開Xcode
yourKey 記得更換你自己的憑證
[“type”:”SAFE_SEARCH_DETECTION”]
設置SAFE_SEARCH_DETECTION
圖片中RGB < 0.2的顏色改變為黑色 剩餘顏色改為白色
點擊URL轉跳APP的某頁面或是啟動某項功能
比如Line所釋出的 line://msg/text/+文字
可以傳送訊息直接帶文字過去Line APP啟動