在iOS 8.3中,Apple更新了一堆表情符号,我想知道是否可以更快地将所有表情符号放入数组中。
如:
let emojiArrays = ["","",...] or plist or something else.
答案 0 :(得分:17)
经过一番挣扎之后,这里有最完整的iOS8.3中的表情符号列表,用Swift.Wrowse编写,以获得最佳兼容性。[2015年4月8日]
let allEmojis = ["","","","","","","","","","","","","☺️","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","❤️","❤️","","❤️","❤️","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","☝","☝","☝","☝","☝","☝","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","✌","✌","✌","✌","✌","✌","","","","","","","✊","✊","✊","✊","✊","✊","✋","✋","✋","✋","✋","✋","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","⚡️","","","☀️","⛅️","☁️","","","☔️","","❄️","","⭐️","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","☕️","","","","","","","","","","","","","","","","","","","","","","✨","","","","","","","","","","❤️","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","⛄️","","","","","","","","","","","","","","","","","","","⛺️","","⚽️","","","⚾️","","","⛳️","","","","","","","","","","","","","","","","","","","","","","","","","","","","️","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","⛽️","","","","","","✈️","","⚓️","","","⛵️","","","","","","","","","","","","","","","","⛲️","","","","","","","","","","","","","","","","","","","⛪️","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","⌚️","","","","⏰","⏳","⌛️","","","","","","","","☎️","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","✉️","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","✂️","","","","","","","✒️","✏️","","","","","","","","","","","","","","","","","","","","","⛔️","","","","","","","","","","","㊙️","㊗️","","","","","️","","","","","","","","️","","❇️","✳️","❎","✅","✴️","","","","","","","","","","","️","","","","","","","","","♈️","♉️","♊️","♋️","♌️","♍️","♎️","♏️","♐️","♑️","♒️","♓️","","","","","♿️","","","","▶️","◀️","","","⏩","⏪","⏫","⏬","➡️","⬅️","⬆️","⬇️","↗️","↘️","↙️","↖️","↕️","↔️","","↪️","↩️","⤴️","⤵️","","","","#⃣","0⃣","1⃣","2⃣","3⃣","4⃣","5⃣","6⃣","7⃣","8⃣","9⃣","","","","","","ℹ️","","","","➕","➖","〰","➗","✖️","✔️","","™","©","®","","","➰","➿","〽️","❗️","❓","❕","❔","‼️","⁉️","❌","⭕️","","","","","","","","Ⓜ️","⛎","","","","⚠️","♨️","♻️","","","♠️","♣️","♥️","♦️","☑️","⚪️","⚫️","","","","","","","","","","▪️","▫️","⬛️","⬜️","◼️","◻️","◾️","◽️","","","","","","","","","","","","","","","","","","","","","","","","","",""]
此外,您可以将它们写入plist文件以保持持久性。
(allEmojis as NSArray).writeToFile(NSHomeDirectory() + "/emoji.plist", atomically: true)
答案 1 :(得分:5)