3
我最近開始創建iOS版本的Android應用程序,並且發現自己正在努力尋找一種從圖像中提取主色的方法。如何使用Swift從UIImage中提取顏色
在Android中,有一個由Google提供的調色板庫,可以讓您做到這一點。 (https://developer.android.com/reference/android/support/v7/graphics/Palette.html)
我似乎無法找到任何允許我在iOS中使用的庫。
我可以在Swift中使用ObjC庫嗎? – jameslfc19
當然可以: 官方文檔:https://developer.apple.com/library/ios/documentation/Swift/Conceptual/BuildingCocoaApps/index.html#//apple_ref/doc/uid/TP40014216-CH2-XID_0 教程:https://medium.com/swift-programming/merge-objective-c-static-library-into-swift-using-mosquitto-87ce0b6ec513 – Masterfego