let temp: String = "0xffeeffff"
How to convert above String to UInt32, because I need to store it in the bitmap which only accept UInt32
Remove "0x" from your string to convert it to UInt32:
let temp = "0xffeeffff"
let result = UInt32(String(temp.characters.dropFirst(2)), radix: 16)