8
A
回答
9
2
找到另一個非常簡單的文章...帶有示例代碼here。
6
2
我知道這個問題一直已經回答和接受,但所有這就是被這裏提到的樣子過時,過時的github上的項目。我發現RSColorPicker這是易於使用,並具有我一直在尋找的所有功能。最重要的是它沒有過時。
2
我以爲我會把我的顏色選擇器扔進戒指。我在我的應用程序You Doodle中使用它,我花了幾個星期的時間在應用程序中進行測試。它包含一個示例項目,向您展示如何開始使用它,並根據MIT許可證開源。它支持任何設備(iOS 6+),任何分辨率和縱向和橫向。收藏夾,最近,顏色色調,色輪和導入紋理,以及刪除和移動收藏夾到前面支持。
我試着將所有其他顏色選擇器的優點組合起來,並確保MIT許可證允許無障礙地集成到任何項目中。
Github上:https://github.com/jjxtra/DRColorPicker
截圖:
2
0
我確實創造了一個色輪中戰平部門(_ RECT:的CGRect)。 See here.
這種觀點基於代碼的下一行:
override func draw(_ rect: CGRect) {
guard let context = UIGraphicsGetCurrentContext() else {
return
}
// Choice width and x position of a rect where will be placed you picker
for x in stride(from: bounds.midX - bounds.height, to: bounds.midX + bounds.height, by: elementSize) {
// Choice height and y position of the rect
for y in stride(from: 0, to: rect.height, by: elementSize) {
// Select color for a point
context.setFillColor(colorFor(x: x, y: y))
// Select color for the point with elementSize which we declare and init as class property
context.fill(CGRect(x: x, y: y, width: elementSize, height: elementSize))
}
}
}
相關問題
- 1. 顏色選擇器
- 2. 蘋果腳本 - 選擇顏色顯示一個無按鈕的無頭色輪顏色選擇器
- 3. WPF顏色選擇器/輪子與多個選擇
- 4. 顏色選擇器選擇的顏色顯示
- 5. 顏色選擇器OS-X選擇錯誤的顏色
- 6. 顏色選擇器,每個顏色選擇發送事件
- 7. 如何在量角器中從顏色選擇器窗口中選擇顏色
- 8. 光譜顏色選擇器,使色彩
- 9. iPhone顏色選擇器
- 10. WP7顏色選擇器
- 11. javascript顏色選擇器
- 12. 顏色選擇器在android?
- 13. 基於顏色選擇器
- 14. 顏色選擇器崩潰
- 15. flex 4.5.1顏色選擇器
- 16. jQuery Mobile顏色選擇器
- 17. Zen cart顏色選擇器
- 18. 顏色選擇器代碼
- 19. 安裝顏色選擇器
- 20. Silverlight顏色選擇器
- 21. 顏色選擇器按鈕
- 22. Eclipse RCP顏色選擇器
- 23. Dynamics AX顏色選擇器
- 24. 顏色選擇器中的自定義顏色
- 25. 更新顏色選擇器面板中的新顏色
- 26. 顏色選擇器(調色板)顯示所有顏色
- 27. 允許網絡用戶進行顏色選擇斷色輪
- 28. ::選擇中剩餘的藍色顏色?
- 29. 界面生成器的顏色選擇器顏色錯誤
- 30. 根據輪廓顏色的顏色點
這是不是一個真正的色輪** **。 – Luke
這是色調。對於Ipad。 – user891268
這對我來說沒有任何意義。什麼是HUE? – Luke