2014-03-13 16:07:25 xiaoai_911 阅读数 10731
var faces_array = {
':bowtie:':1,
':smile:':U+1F604,
':laughing:':U+1F606,
':blush:':U+1F60A,
':smiley:':U+1F603,
':relaxed:':U+263A,
':smirk:':U+1F60F,
':heart_eyes:':U+1F60D,
':kissing_heart:':U+1F618,
':kissing_closed_eyes:':U+1F61A,
':flushed:':U+1F633,
':relieved:':U+1F60C,
':satisfied:':U+1F606,
':grin:':U+1F601,
':wink:':U+1F609,
':stuck_out_tongue_winking_eye:':U+1F61C,
':stuck_out_tongue_closed_eyes:':U+1F61D,
':grinning:':U+1F601,
':kissing:':U+1F619,
':kissing_smiling_eyes:':U+1F617,
':stuck_out_tongue:':U+1F61C,
':sleeping:':22,
':worried:':U+1F61F,
':frowning:':U+1F627,
':anguished:':U+1F626,
':open_mouth:':U+1F62E,
':grimacing:':U+1F600,
':confused:':U+1F62F,
':hushed:':29,
':expressionless:':U+1F611,
':unamused:':U+1F612,
':sweat_smile:':U+1F605,
':sweat:':U+1F613,
':disappointed_relieved:':U+1F625,
':weary:':U+1F629,
':pensive:':U+1F614,
':disappointed:':U+1F61E,
':confounded:':U+1F616,
':fearful:':U+1F628,
':cold_sweat:':U+1F630,
':persevere:':U+1F623,
':cry:':U+1F622,
':sob:':U+1F62D,
':joy:':U+1F602,
':astonished:':U+1F632,
':scream:':U+1F631,
':neckbeard:':47,
':tired_face:':U+1F62B,
':angry:':U+1F620,
':rage:':U+1F621,
':triumph:':U+1F624,
':sleepy:':U+1F62A,
':yum:':U+1F60B,
':mask:':U+1F637,
':sunglasses:':U+1F60E,
':dizzy_face:':U+1F635,
':imp:':U+1F47F,
':smiling_imp:':U+1F608,
':neutral_face:':U+1F610,
':no_mouth:':U+1F636,
':innocent:':U+1F607,
':alien:':U+1F47D,
':yellow_heart:':U+1F49B,
':blue_heart:':U+1F499,
':purple_heart:':U+1F49C,
':heart:':U+2764,
':green_heart:':U+1F49A,
':broken_heart:':U+1F494,
':heartbeat:':U+1F493,
':heartpulse:':U+1F497,
':two_hearts:':U+1F495,
':revolving_hearts:':U+1F49E,
':cupid:':U+1F498,
':sparkling_heart:':U+1F496,
':sparkles:':U+2728,
':star:':U+2B50,
':star2:':U+1F31F,
':dizzy:':U+1F4AB,
':boom:':U+1F4A5,
':collision:':U+1F4A5,
':anger:':U+1F4A2,
':exclamation:':U+2757,
':question:':U+2753,
':grey_exclamation:':U+2755,
':grey_question:':U+2754,
':zzz:':U+1F4A4,
':dash:':U+1F4A8,
':sweat_drops:':U+1F4A6,
':notes:':U+1F3B6,
':musical_note:':U+1F3B5,
':fire:':U+1F525,
':hankey:':U+1F4A9,
':poop:':U+1F4A9,
':shit:':U+1F4A9,
':+1:':U+1F44D,
':thumbsup:':U+1F44D,
':-1:':U+1F44E,
':thumbsdown:':U+1F44E,
':ok_hand:':U+1F44C,
':punch:':U+1F44A,
':facepunch:':101,
':fist:':U+270A,
':v:':U+270C,
':wave:':U+1F44B,
':hand:':U+270B,
':raised_hand:':U+270B,
':open_hands:':U+1F450,
':point_up:':U+261D,
':point_down:':U+1F447,
':point_left:':U+1F448,
':point_right:':U+1F449,
':raised_hands:':U+1F64C,
':pray:':U+1F64F,
':point_up_2:':U+1F446,
':clap:':U+1F44F,
':muscle:':U+1F4AA,
':metal:':117,
':fu:':118,
':walking:':U+1F6B6,
':runner:':U+1F3C3,
':running:':U+1F3C3,
':couple:':U+1F46B,
':family:':U+1F46A,
':two_men_holding_hands:':U+1F46C,
':two_women_holding_hands:':U+1F46D,
':dancer:':U+1F483,
':dancers:':U+1F46F,
':ok_woman:':U+1F646,
':no_good:':U+1F645,
':information_desk_person:':U+1F481,
':raising_hand:':U+1F64B,
':bride_with_veil:':U+1F470,
':person_with_pouting_face:':U+1F64E,
':person_frowning:':U+1F64D,
':bow:':U+1F647,
':couplekiss:':U+1F48F,
':couple_with_heart:':U+1F491,
':massage:':U+1F486,
':haircut:':U+1F487,
':nail_care:':U+1F485,
':boy:':U+1F466,
':girl:':U+1F467,
':woman:':U+1F469,
':man:':U+1F468,
':baby:':U+1F476,
':older_woman:':U+1F475,
':older_man:':U+1F474,
':person_with_blond_hair:':U+1F471,
':man_with_gua_pi_mao:':U+1F472,
':man_with_turban:':U+1F473,
':construction_worker:':U+1F477,
':cop:':U+1F46E,
':angel:':U+1F47C,
':princess:':U+1F478,
':smiley_cat:':U+1F63A,
':smile_cat:':U+1F638,
':heart_eyes_cat:':U+1F63B,
':kissing_cat:':U+1F63D,
':smirk_cat:':U+1F63C,
':scream_cat:':U+1F640,
':crying_cat_face:':U+1F63F,
':joy_cat:':U+1F639,
':pouting_cat:':U+1F63E,
':japanese_ogre:':U+1F479,
':japanese_goblin:':U+1F47A,
':see_no_evil:':U+1F648,
':hear_no_evil:':U+1F649,
':speak_no_evil:':U+1F64A,
':guardsman:':U+1F482,
':skull:':U+1F480,
':feet:':U+1F463,
':lips:':U+1F444,
':kiss:':U+1F48B,
':droplet:':U+1F4A7,
':ear:':U+1F442,
':eyes:':U+1F440,
':nose:':U+1F443,
':tongue:':U+1F445,
':love_letter:':U+1F48C,
':bust_in_silhouette:':U+1F464,
':busts_in_silhouette:':U+1F465,
':speech_balloon:':U+1F4AC,
':thought_balloon:':U+1F4AD,
':feelsgood:':184,
':finnadie:':185,
':goberserk:':186,
':godmode:':187,
':hurtrealbad:':188,
':rage1:':189,
':rage2:':190,
':rage3:':191,
':rage4:':192,
':suspect:':193,
':trollface:':194,
':sunny:':U+2600,
':umbrella:':U+2614,
':cloud:':0x2601,
':snowflake:':U+2744,
':snowman:':U+26C4,
':zap:':U+26A1,
':cyclone:':U+1F300,
':foggy:':U+1F301,
':ocean:':U+1F30A,
':cat:':U+1F431,
':dog:':U+1F436,
':mouse:':U+1F430,
':hamster:':U+1F439,
':rabbit:':U+1F430,
':wolf:':U+1F43A,
':frog:':U+1F438,
':tiger:':U+1F42F,
':koala:':U+1F428,
':bear:':U+1F43B,
':pig:':U+1F437,
':pig_nose:':U+1F43D,
':cow:':U+1F42E,
':boar:':U+1F417,
':monkey_face:':U+1F435,
':monkey:':U+1F412,
':horse:':U+1F434,
':racehorse:':U+1F40E,
':camel:':U+1F42B,
':sheep:':U+1F411,
':elephant:':U+1F418,
':panda_face:':U+1F43C,
':snake:':U+1F40D,
':bird:':U+1F426,
':baby_chick:':U+1F424,
':hatched_chick:':U+1F425,
':hatching_chick:':U+1F423,
':chicken:':U+1F414,
':penguin:':U+1F427,
':turtle:':U+1F422,
':bug:':U+1F41B,
':honeybee:':U+1F41D,
':ant:':U+1F41C,
':beetle:':U+1F41E,
':snail:':U+1F40C,
':octopus:':U+1F419,
':tropical_fish:':U+1F420,
':fish:':U+1F41F,
':whale:':U+1F433,
':whale2:':U+1F40B,
':dolphin:':U+1F42C,
':cow2:':U+1F404,
':ram:':U+1F40F,
':rat:':U+1F400,
':water_buffalo:':U+1F403,
':tiger2:':U+1F405,
':rabbit2:':U+1F407,
':dragon:':U+1F432,
':goat:':U+1F410,
':rooster:':U+1F413,
':dog2:':U+1F415,
':pig2:':U+1F416,
':mouse2:':U+1F42D,
':ox:':U+1F402,
':dragon_face:':U+1F432,
':blowfish:':U+1F421,
':crocodile:':U+1F40A,
':dromedary_camel:':U+1F42A,
':leopard:':U+1F406,
':cat2:':U+1F408,
':poodle:':U+1F429,
':paw_prints:':U+1F43E,
':bouquet:':U+1F490,
':cherry_blossom:':U+1F338,
':tulip:':U+1F337,
':four_leaf_clover:':U+1F340,
':rose:':U+1F339,
':sunflower:':U+1F33B,
':hibiscus:':U+1F33A,
':maple_leaf:':U+1F341,
':leaves:':U+1F343,
':fallen_leaf:':U+1F342,
':herb:':U+1F33F,
':mushroom:':U+1F344,
':cactus:':U+1F335,
':palm_tree:':U+1F334,
':evergreen_tree:':U+1F332,
':deciduous_tree:':U+1F333,
':chestnut:':U+1F330,
':seedling:':U+1F331,
':blossom:':U+1F33C,
':ear_of_rice:':U+1F33E,
':shell:':U+1F41A,
':globe_with_meridians:':U+1F310,
':sun_with_face:':U+1F31E,
':full_moon_with_face:':U+1F31D,
':new_moon_with_face:':U+1F31A,
':new_moon:':U+1F311,
':waxing_crescent_moon:':U+1F312,
':first_quarter_moon:':U+1F313,
':waxing_gibbous_moon:':U+1F314,
':full_moon:':U+1F315,
':waning_gibbous_moon:':U+1F316,
':last_quarter_moon:':U+1F317,
':waning_crescent_moon:':U+1F318,
':last_quarter_moon_with_face:':U+1F31C,
':first_quarter_moon_with_face:':U+1F31B,
':moon:':U+1F319,
':earth_africa:':U+1F30D,
':earth_americas:':U+1F30E,
':earth_asia:':U+1F30F,
':volcano:':U+1F30B,
':milky_way:':U+1F30C,
':partly_sunny:':U+26C5,
':octocat:':308,
':squirrel:':309,
':bamboo:':U+1F38D,
':gift_heart:':U+1F49D,
':dolls:':U+1F38E,
':school_satchel:':U+1F392,
':mortar_board:':U+1F393,
':flags:':U+1F38F,
':fireworks:':U+1F386,
':sparkler:':U+1F387,
':wind_chime:':U+1F390,
':rice_scene:':U+1F391,
':jack_o_lantern:':U+1F383,
':ghost:':U+1F47B,
':santa:':U+1F385,
':christmas_tree:':U+1F384,
':gift:':U+1F381,
':bell:':U+1F514,
':no_bell:':U+1F515,
':tanabata_tree:':U+1F38B,
':tada:':U+1F389,
':confetti_ball:':U+1F38A,
':balloon:':U+1F388,
':crystal_ball:':U+1F52E,
':cd:':U+1F4BF,
':dvd:':U+1F4C0,
':floppy_disk:':U+1F4BE,
':camera:':U+1F4F7,
':video_camera:':U+1F4F9,
':movie_camera:':U+1F3A5,
':computer:':U+1F4BB,
':tv:':U+1F4FA,
':iphone:':U+1F4F1,
':phone:':U+260E,
':telephone:':U+260E,
':telephone_receiver:':U+1F4DE,
':pager:':U+1F4DF,
':fax:':U+1F4E0,
':minidisc:':U+1F4BD,
':vhs:':U+1F4FC,
':sound:':U+1F509,
':speaker:':U+1F50A,
':mute:':U+1F507,
':loudspeaker:':U+1F4E2,
':mega:':U+1F4E3,
':hourglass:':U+231B,
':hourglass_flowing_sand:':U+23F3,
':alarm_clock:':U+23F0,
':watch:':U+231A,
':radio:':U+1F4FB,
':satellite:':U+1F4E1,
':loop:':U+27BF,
':mag:':U+1F50D,
':mag_right:':U+1F50E,
':unlock:':U+1F513,
':lock:':U+1F512,
':lock_with_ink_pen:':U+1F50F,
':closed_lock_with_key:':U+1F510,
':key:':U+1F511,
':bulb:':U+1F4A1,
':flashlight:':U+1F526,
':high_brightness:':U+1F506,
':low_brightness:':U+1F505,
':electric_plug:':U+1F50C,
':battery:':U+1F50B,
':calling:':U+1F4F2,
':email:':U+1F4E9,
':mailbox:':U+1F4EB,
':postbox:':U+1F4EE,
':bath:':U+1F6C0,
':bathtub:':U+1F6C1,
':shower:':U+1F6BF,
':toilet:':U+1F6BD,
':wrench:':U+1F527,
':nut_and_bolt:':U+1F529,
':hammer:':U+1F528,
':seat:':U+1F4BA,
':moneybag:':U+1F4B0,
':yen:':U+1F4B4,
':dollar:':U+1F4B5,
':pound:':U+1F4B7,
':euro:':U+1F4B6,
':credit_card:':U+1F4B3,
':money_with_wings:':U+1F4B8,
':e-mail:':U+1F4E7,
':inbox_tray:':U+1F4E5,
':outbox_tray:':U+1F4E4,
':envelope:':U+2709,
':incoming_envelope:':U+1F4E8,
':postal_horn:':U+1F4EF,
':mailbox_closed:':U+1F4EA,
':mailbox_with_mail:':U+1F4EC,
':mailbox_with_no_mail:':U+1F4ED,
':door:':U+1F6AA,
':smoking:':U+1F6AC,
':bomb:':U+1F4A3,
':gun:':U+1F52B,
':hocho:':U+1F52A,
':pill:':U+1F48A,
':syringe:':U+1F489,
':page_facing_up:':U+1F4C4,
':page_with_curl:':U+1F4C3,
':bookmark_tabs:':U+1F4D1,
':bar_chart:':U+1F4CA,
':chart_with_upwards_trend:':U+1F4C8,
':chart_with_downwards_trend:':U+1F4C9,
':scroll:':U+1F4DC,
':clipboard:':U+1F4CB,
':calendar:':U+1F4C6,
':date:':U+1F4C5,
':card_index:':U+1F4C7,
':file_folder:':U+1F4C1,
':open_file_folder:':U+1F4C2,
':scissors:':U+2702,
':pushpin:':U+1F4CC,
':paperclip:':U+1F4CE,
':black_nib:':U+2712,
':pencil2:':U+270F,
':straight_ruler:':U+1F4CF,
':triangular_ruler:':U+1F4D0,
':closed_book:':U+1F4D5,
':green_book:':U+1F4D7,
':blue_book:':U+1F4D8,
':orange_book:':U+1F4D9,
':notebook:':U+1F4D3,
':notebook_with_decorative_cover:':U+1F4D4,
':ledger:':U+1F4D2,
':books:':U+1F4DA,
':bookmark:':U+1F516,
':name_badge:':U+1F4DB,
':microscope:':U+1F52C,
':telescope:':U+1F52D,
':newspaper:':U+1F4F0,
':football:':U+1F3C8,
':basketball:':U+1F3C0,
':soccer:':U+26BD,
':baseball:':U+26BE,
':tennis:':U+1F3BE,
':8ball:':U+1F3B1,
':rugby_football:':U+1F3C9,
':bowling:':U+1F3B3,
':golf:':U+26F3,
':mountain_bicyclist:':U+1F6B5,
':bicyclist:':U+1F6B4,
':horse_racing:':U+1F40E,
':snowboarder:':U+1F3C2,
':swimmer:':U+1F3CA,
':surfer:':U+1F3C4,
':ski:':U+1F3BF,
':spades:':U+2660,
':hearts:':U+2665,
':clubs:':U+2663,
':diamonds:':U+2666,
':gem:':U+1F48E,
':ring:':U+1F48D,
':trophy:':U+1F3C6,
':musical_score:':U+1F3BC,
':musical_keyboard:':U+1F3B9,
':violin:':U+1F3BB,
':space_invader:':U+1F47E,
':video_game:':U+1F3AE,
':black_joker:':U+1F0CF,
':flower_playing_cards:':U+1F3B4,
':game_die:':U+1F3B2,
':dart:':U+1F3AF,
':mahjong:':U+1F004,
':clapper:':U+1F3AC,
':memo:':U+1F4DD,
':pencil:':U+1F4DD,
':book:':U+1F4D6,
':art:':U+1F3A8,
':microphone:':U+1F3A4,
':headphones:':U+1F3A7,
':trumpet:':U+1F3BA,
':saxophone:':U+1F3B7,
':guitar:':U+1F3B8,
':shoe:':U+1F45F,
':sandal:':U+1F461,
':high_heel:':U+1F460,
':lipstick:':U+1F484,
':boot:':U+1F462,
':shirt:':U+1F455,
':tshirt:':U+1F455,
':necktie:':U+1F454,
':womans_clothes:':U+1F45A,
':dress:':U+1F457,
':running_shirt_with_sash:':U+1F3BD,
':jeans:':U+1F456,
':kimono:':U+1F458,
':bikini:':U+1F459,
':ribbon:':U+1F380,
':tophat:':U+1F3A9,
':crown:':U+1F451,
':womans_hat:':U+1F452,
':mans_shoe:':U+1F45E,
':closed_umbrella:':U+1F302,
':briefcase:':U+1F4BC,
':handbag:':U+1F45C,
':pouch:':U+1F45D,
':purse:':U+1F45B,
':eyeglasses:':U+1F453,
':fishing_pole_and_fish:':U+1F3A3,
':coffee:':U+2615,
':tea:':U+1F375,
':sake:':U+1F376,
':baby_bottle:':U+1F37C,
':beer:':U+1F37A,
':beers:':U+1F37B,
':cocktail:':U+1F378,
':tropical_drink:':U+1F379,
':wine_glass:':U+1F377,
':fork_and_knife:':U+1F374,
':pizza:':U+1F355,
':hamburger:':U+1F354,
':fries:':U+1F35F,
':poultry_leg:':U+1F357,
':meat_on_bone:':U+1F356,
':spaghetti:':U+1F35D,
':curry:':U+1F35B,
':fried_shrimp:':U+1F364,
':bento:':U+1F371,
':sushi:':U+1F363,
':fish_cake:':U+1F365,
':rice_ball:':U+1F359,
':rice_cracker:':U+1F358,
':rice:':U+1F35A,
':ramen:':U+1F35C,
':stew:':U+1F372,
':oden:':U+1F362,
':dango:':U+1F361,
':egg:':U+1F373,
':bread:':U+1F35E,
':doughnut:':U+1F369,
':custard:':U+1F36E,
':icecream:':U+1F366,
':ice_cream:':U+1F368,
':shaved_ice:':U+1F367,
':birthday:':U+1F382,
':cake:':U+1F370,
':cookie:':U+1F36A,
':chocolate_bar:':U+1F36B,
':candy:':U+1F36C,
':lollipop:':U+1F36D,
':honey_pot:':U+1F36F,
':apple:':U+1F34E,
':green_apple:':U+1F34F,
':tangerine:':U+1F34A,
':lemon:':U+1F34B,
':cherries:':U+1F352,
':grapes:':U+1F347,
':watermelon:':U+1F349,
':strawberry:':U+1F353,
':peach:':U+1F351,
':melon:':U+1F348,
':banana:':U+1F34C,
':pear:':U+1F350,
':pineapple:':U+1F34D,
':sweet_potato:':U+1F360,
':eggplant:':U+1F346,
':tomato:':U+1F345,
':corn:':U+1F33D,
':house:':U+1F3E0,
':house_with_garden:':U+1F3E1,
':school:':U+1F3EB,
':office:':U+1F3E2,
':post_office:':U+1F3E3,
':hospital:':U+1F3E5,
':bank:':U+1F3E6,
':convenience_store:':U+1F3EA,
':love_hotel:':U+1F3E9,
':hotel:':U+1F3E8,
':wedding:':U+1F492,
':church:':U+26EA,
':department_store:':U+1F3EC,
':european_post_office:':582,
':city_sunrise:':U+1F307,
':city_sunset:':U+1F306,
':japanese_castle:':U+1F3EF,
':european_castle:':U+1F3F0,
':tent:':U+26FA,
':factory:':U+1F3ED,
':tokyo_tower:':U+1F5FC,
':japan:':U+1F5FE,
':mount_fuji:':U+1F5FB,
':sunrise_over_mountains:':U+1F304,
':sunrise:':U+1F305,
':stars:':U+1F303,
':statue_of_liberty:':U+1F5FD,
':bridge_at_night:':U+1F309,
':carousel_horse:':U+1F3A0,
':rainbow:':U+1F308,
':ferris_wheel:':U+1F3A1,
':fountain:':U+26F2,
':roller_coaster:':U+1F3A2,
':ship:':U+1F6A2,
':speedboat:':U+1F6A4,
':boat:':U+26F5,
':sailboat:':U+26F5,
':rowboat:':U+1F6A3,
':anchor:':U+2693,
':rocket:':U+1F680,
':airplane:':U+2708,
':helicopter:':U+1F681,
':steam_locomotive:':U+1F682,
':tram:':U+1F68A,
':mountain_railway:':613,
':bike:':U+1F6B2,
':aerial_tramway:':U+1F6A1,
':suspension_railway:':U+1F69F,
':mountain_cableway:':U+1F6A0,
':tractor:':U+1F69C,
':blue_car:':U+1F699,
':oncoming_automobile:':U+1F698,
':car:':U+1F697,
':red_car:':U+1F697,
':taxi:':U+1F695,
':oncoming_taxi:':U+1F696,
':articulated_lorry:':625,
':bus:':U+1F68C,
':oncoming_bus:':U+1F68D,
':rotating_light:':U+1F6A8,
':police_car:':U+1F693,
':oncoming_police_car:':U+1F694,
':fire_engine:':U+1F692,
':ambulance:':U+1F691,
':minibus:':U+1F690,
':truck:':U+1F69A,
':train:':U+1F683,
':station:':U+1F689,
':train2:':U+1F685,
':bullettrain_front:':U+1F685,
':bullettrain_side:':U+1F684,
':light_rail:':U+1F688,
':monorail:':U+1F69D,
':railway_car:':U+1F683,
':trolleybus:':U+1F68E,
':ticket:':U+1F3AB,
':fuelpump:':U+26FD,
':vertical_traffic_light:':U+1F6A6,
':traffic_light:':U+1F6A5,
':warning:':U+26A0,
':construction:':U+1F6A7,
':beginner:':U+1F530,
':atm:':U+1F3E7,
':slot_machine:':U+1F3B0,
':busstop:':U+1F68F,
':barber:':U+1F488,
':hotsprings:':U+2668,
':checkered_flag:':U+1F3C1,
':crossed_flags:':U+1F38C,
':izakaya_lantern:':U+1F3EE,
':moyai:':U+1F5FF,
':circus_tent:':U+1F3AA,
':performing_arts:':U+1F3AD,
':round_pushpin:':U+1F4CD,
':triangular_flag_on_post:':U+1F6A9,
':jp:':U+1F1EF U+1F1F5,
':kr:':U+1F1F0 U+1F1F7,
':cn:':U+1F1E8 U+1F1F3,
':us:':U+1F1FA U+1F1F8,
':fr:':U+1F1EB U+1F1F7,
':es:':U+1F1EA U+1F1F8,
':it:':U+1F1EE U+1F1F9,
':ru:':U+1F1F7 U+1F1FA,
':gb:':U+1F1EC U+1F1E7,
':uk:':U+1F1EC U+1F1E7,
':de:':U+1F1E9 U+1F1EA,
':one:':U+0031 U+20E3,
':two:':U+0032 U+20E3,
':three:':U+0033 U+20E3,
':four:':U+0034 U+20E3,
':five:':U+0035 U+20E3,
':six:':U+0036 U+20E3,
':seven:':U+0037 U+20E3,
':eight:':U+0038 U+20E3,
':nine:':U+0039 U+20E3,
':keycap_ten:':U+1F51F,
':1234:':U+1F522,
':zero:':U+0030 U+20E3,
':hash:':U+0023 U+20E3,
':symbols:':U+1F523,
':arrow_backward:':U+25C0,
':arrow_down:':U+2B07,
':arrow_forward:':U+25B6,
':arrow_left:':U+2B05,
':capital_abcd:':U+1F520,
':abcd:':U+1F521,
':abc:':U+1F524,
':arrow_lower_left:':U+2199,
':arrow_lower_right:':U+2198,
':arrow_right:':U+27A1,
':arrow_up:':U+2B06,
':arrow_upper_left:':U+2196,
':arrow_upper_right:':U+2197,
':arrow_double_down:':U+23EC,
':arrow_double_up:':U+23EB,
':arrow_down_small:':U+1F53D,
':arrow_heading_down:':U+2935,
':arrow_heading_up:':U+2934,
':leftwards_arrow_with_hook:':U+21A9,
':arrow_right_hook:':U+21AA,
':left_right_arrow:':U+2194,
':arrow_up_down:':U+2195,
':arrow_up_small:':U+1F53D,
':arrows_clockwise:':U+1F503,
':arrows_counterclockwise:':U+1F504,
':rewind:':U+23EA,
':fast_forward:':U+23E9,
':information_source:':U+2139,
':ok:':U+1F197,
':twisted_rightwards_arrows:':U+1F500,
':repeat:':U+1F501,
':repeat_one:':U+1F502,
':new:':U+1F195,
':top:':U+1F51D,
':up:':U+1F199,
':cool:':U+1F192,
':free:':U+1F193,
':ng:':U+1F196,
':cinema:':U+1F3A6,
':koko:':728U+1F201
':signal_strength:':U+1F4F6,
':u5272:':U+1F239,
':u5408:':U+1F234,
':u55b6:':U+1F23A,
':u6307:':U+1F22F,
':u6708:':U+1F237,
':u6709:':U+1F236,
':u6e80:':U+1F235,
':u7121:':U+1F21A,
':u7533:':U+1F238,
':u7a7a:':U+1F233,
':u7981:':U+1F232,
':sa:':U+1F202,
':restroom:':U+1F6BB,
':mens:':U+1F6B9,
':womens:':U+1F6BA,
':baby_symbol:':U+1F6BC,
':no_smoking:':U+1F6AD,
':parking:':U+1F17F,
':wheelchair:':U+267F,
':metro:':U+1F687,
':baggage_claim:':U+1F6C4,
':accept:':U+1F251,
':wc:':U+1F6BE,
':potable_water:':U+1F6B0,
':put_litter_in_its_place:':U+1F6AE,
':secret:':U+3299,
':congratulations:':U+3297,
':m:':U+24C2,
':passport_control:':U+1F6C2,
':left_luggage:':U+1F6C5,
':customs:':U+1F6C3,
':ideograph_advantage:':U+1F250,
':cl:':U+1F191,
':sos:':U+1F198,
':id:':U+1F194,
':no_entry_sign:':U+1F6AB,
':underage:':U+1F51E,
':no_mobile_phones:':U+1F4F5,
':do_not_litter:':U+1F6AF,
':non-potable_water:':U+1F6B1,
':no_bicycles:':U+1F6B3,
':no_pedestrians:':U+1F6B7,
':children_crossing:':U+1F6B8,
':no_entry:':U+26D4,
':eight_spoked_asterisk:':U+2733,
':eight_pointed_black_star:':U+2734,
':heart_decoration:':U+1F49F,
':vs:':U+1F19A,
':vibration_mode:':U+1F4F3,
':mobile_phone_off:':U+1F4F4,
':chart:':U+1F4B9,
':currency_exchange:':U+1F4B1,
':aries:':U+2648,
':taurus:':U+2649,
':gemini:':U+264A,
':cancer:':U+264B,
':leo:':U+264C,
':virgo:':U+264D,
':libra:':U+264E,
':scorpius:':U+264F,
':sagittarius:':U+2650,
':capricorn:':U+2651,
':aquarius:':U+2652,
':pisces:':U+2653,
':ophiuchus:':U+26CE,
':six_pointed_star:':U+1F52F,
':negative_squared_cross_mark:':U+274E,
':a:':U+1F170,
':b:':U+1F171,
':ab:':U+1F18E,
':o2:':U+1F17E,
':diamond_shape_with_a_dot_inside:':U+1F4A0,
':recycle:':U+267B,
':end:':U+1F51A,
':on:':U+1F51B,
':soon:':U+1F51C,
':clock1:':U+1F550,
':clock130:':U+1F55C,
':clock10:':U+1F559,
':clock1030:':U+1F565,
':clock11:':U+1F55A,
':clock1130:':U+1F566,
':clock12:':U+1F55B,
':clock1230:':U+1F567,
':clock2:':U+1F551,
':clock230:':U+1F55D,
':clock3:':U+1F552,
':clock330:':U+1F55E,
':clock4:':U+1F553,
':clock430:':U+1F55F,
':clock5:':U+1F554,
':clock530:':U+1F560,
':clock6:':U+1F555,
':clock630:':U+1F561,
':clock7:':U+1F556,
':clock730:':U+1F562,
':clock8:':U+1F557,
':clock830:':U+1F563,
':clock9:':U+1F558,
':clock930:':U+1F564,
':heavy_dollar_sign:':U+1F4B2,
':copyright:':U+00A9,
':registered:':U+00AE,
':tm:':U+2122,
':x:':U+274C,
':heavy_exclamation_mark:':U+2757,
':bangbang:':U+203C,
':interrobang:':U+2049,
':o:':U+2B55,
':heavy_multiplication_x:':U+2716,
':heavy_plus_sign:':U+2795,
':heavy_minus_sign:':U+2796,
':heavy_division_sign:':U+2797,
':white_flower:':U+1F4AE,
':100:':U+1F4AF,
':heavy_check_mark:':U+2714,
':ballot_box_with_check:':U+2611,
':radio_button:':U+1F518,
':link:':U+1F517,
':curly_loop:':U+27B0,
':wavy_dash:':U+3030,
':part_alternation_mark:':U+303D,
':trident:':U+1F531,
':black_square:':U+2B1B,
':white_square:':U+2B1C,
':white_check_mark:':U+2705,
':black_square_button:':U+1F532,
':white_square_button:':U+1F533,
':black_circle:':U+26AB,
':white_circle:':U+26AA,
':red_circle:':U+1F534,
':large_blue_circle:':U+1F535,
':large_blue_diamond:':U+1F537,
':large_orange_diamond:':U+1F536,
':small_blue_diamond:':U+1F539,
':small_orange_diamond:':U+1F538,
':small_red_triangle:':U+1F53A,
':small_red_triangle_down:':U+1F53B,
':shipit:':868

};

还有一些没有找到对应的值,先备份一下;

参考:

http://www.emoji-cheat-sheet.com/  (最全的,但是没有unicode值)

http://punchdrunker.github.io/iOSEmoji/table_html/index.html (unicode值表)

http://code.iamcal.com/php/emoji/   (unicode值表)








2018-01-17 17:32:21 ljc_563812704 阅读数 407

一、实现的逻辑很简单且代码量不多,直接贴出源码供方便快速使用。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
@property (nonatomic, strong) UITextView *textView;
@property (nonatomic, strong) UILabel *limitLabel;
    _textView = [[UITextView alloc] initWithFrame:CGRectMake(55, MAIN_WIDTH-10130.3)];
    _textView.placeHolder = @"请描述您的问题...";
    _textView.returnKeyType = UIReturnKeyDone;
    _textView.delegate = self;
    _textView.textColor = UIColorFromRGB(0xBEBDBD);
    _textView.font = [UIFont systemFontOfSize:15];
    [self addSubview:_textView];
     
    _limitLabel = [[UILabel alloc] initWithFrame:CGRectMake(MAIN_WIDTH/4*3130.3, MAIN_WIDTH/4-1020)];
    _limitLabel.text = @"0/500";
    _limitLabel.font = [UIFont systemFontOfSize:12];
    _limitLabel.textAlignment = NSTextAlignmentRight;
    _limitLabel.textColor = UIColorFromRGB(0x999999);
    _limitLabel.backgroundColor = [UIColor clearColor];

二、实现TextView代理方法

实时监听TextView输入框的return键,当点击return键时结束编辑的实现思路:判断输入的字是否为\n回车,即按下return键

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
- (void)textViewDidChange:(UITextView *)textView {
    _limitLabel.text = [NSString stringWithFormat:@"%ld/500",textView.text.length ];
}
- (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text{
    NSLog(@"textLength == %ld",textView.text.length);
    if ([text isEqualToString:@"\n"]){ //判断输入的字是否是回车,即按下return
        [self.textView resignFirstResponder];
        return NO;
    }
    if ([self stringContainsEmoji:text] == YES) {
        [PubllicMaskViewHelper showTipViewWith:@"不支持输入Emoji表情符号" inSuperView:self withDuration:1];
        return NO;
    }
    if (textView.text.length + text.length > 500) {
        NSString *allText = [NSString stringWithFormat:@"%@%@",textView.text,text];
        textView.text = [allText substringToIndex:500];
        [PubllicMaskViewHelper showTipViewWith:@"输入不能超过500个字" inSuperView:self withDuration:1];
        return NO;
    }
    return YES;
}

三、过滤所有Emoji表情符号

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// 过滤所有表情
- (BOOL)stringContainsEmoji:(NSString *)string {
    __block BOOL returnValue = NO;
    [string enumerateSubstringsInRange:NSMakeRange(0, [string length]) options:NSStringEnumerationByComposedCharacterSequences usingBlock:
     ^(NSString *substring, NSRange substringRange, NSRange enclosingRange, BOOL *stop) {
          
         const unichar hs = [substring characterAtIndex:0];
         // surrogate pair
         if (0xd800 <= hs && hs  1) {
                 const unichar ls = [substring characterAtIndex:1];
                 const int uc = ((hs - 0xd800) * 0x400) + (ls - 0xdc00) + 0x10000;
                 if (0x1d000 <= uc && uc  1) {
             const unichar ls = [substring characterAtIndex:1];
             if (ls == 0x20e3) {
                 returnValue = YES;
             }
              
         else {
             // non surrogate
             if (0x2100 <= hs && hs <= 0x27ff) {
                 returnValue = YES;
             else if (0x2B05 <= hs && hs <= 0x2b07) {
                 returnValue = YES;
             else if (0x2934 <= hs && hs <= 0x2935) {
                 returnValue = YES;
             else if (0x3297 <= hs && hs <= 0x3299) {
                 returnValue = YES;
             else if (hs == 0xa9 || hs == 0xae || hs == 0x303d || hs == 0x3030 || hs == 0x2b55 || hs == 0x2b1c || hs == 0x2b1b || hs == 0x2b50) {
                 returnValue = YES;
             }
         }
     }];
     
    return returnValue;
}
2016-08-08 19:53:22 yy1992320 阅读数 1112

服务器端不支持Emoji表情,因此客户端在上传用户输入时,不能包含Emoji表情。

在客户端发送请求前,判断用户输入中是否含有表情,如果含有表情,则提示用户重新输入。这个过程关键是如何判断字符串中是否含有Emoji表情。

以下是具体代码,可以写到工具类中,以后肯定会有用到

//判断是否为表情符号

+ (BOOL)stringContainsEmoji:(NSString *)string

{

    __block BOOL returnValue = NO;

    

    [string enumerateSubstringsInRange:NSMakeRange(0, [string length])

                               options:NSStringEnumerationByComposedCharacterSequences

                            usingBlock:^(NSString *substring, NSRange substringRange, NSRange enclosingRange, BOOL *stop) {

                                const unichar hs = [substring characterAtIndex:0];

                                if (0xd800 <= hs && hs <= 0xdbff) {

                                    if (substring.length > 1) {

                                        const unichar ls = [substring characterAtIndex:1];

                                        const int uc = ((hs - 0xd800) * 0x400) + (ls - 0xdc00) + 0x10000;

                                        if (0x1d000 <= uc && uc <= 0x1f77f) {

                                            returnValue = YES;

                                        }

                                    }

                                } else if (substring.length > 1) {

                                    const unichar ls = [substring characterAtIndex:1];

                                    if (ls == 0x20e3) {

                                        returnValue = YES;

                                    }

                                } else {

                                    if (0x2100 <= hs && hs <= 0x27ff) {

                                        returnValue = YES;

                                    } else if (0x2B05 <= hs && hs <= 0x2b07) {

                                        returnValue = YES;

                                    } else if (0x2934 <= hs && hs <= 0x2935) {

                                        returnValue = YES;

                                    } else if (0x3297 <= hs && hs <= 0x3299) {

                                        returnValue = YES;

                                    } else if (hs == 0xa9 || hs == 0xae || hs == 0x303d || hs == 0x3030 || hs == 0x2b55 || hs == 0x2b1c || hs == 0x2b1b || hs == 0x2b50) {

                                        returnValue = YES;

                                    }

                                }

                            }];

    

    return returnValue;

}



2010-12-20 20:06:00 doubleuto 阅读数 19388

Emoji的介绍参见wiki,iOS支持的emoji表情列表参见http://pukupi.com/post/1964/,iOS支持的emoji表情的Unicode编码范围为[0xE001,0xE05A]&[0xE101,0xE15A]&[0xE201,0xE253]&[0xE401&0xE44C]&[0xE501,0xE537],Unicode编码转为NSString的方法为[NSStringstringWithFormat:@"%C", i].使用如下代码可以弹出一个可以选择Emoji表情的输入框,

 

- (void)didSelectAFace:(id)sender{

UIButton *button = (UIButton *)sender;

NSString *emojiStr = [NSString stringWithFormat:@"%C", button.tag];

textView.text = [NSString stringWithFormat:@"%@%@",textView.text,emojiStr];

}

 

- (void)hideEmojiView{

 

[emojiView removeFromSuperview];

 

[emojiCloseButton removeFromSuperview];

}

 

- (void)showEmojiView{

 

CGFloat x = (self.view.frame.size.width-300.0f)/2;

CGFloat y = self.view.frame.size.height - 190;

 

if (emojiView == nil) {

 

self.emojiView = [[UIView allocinitWithFrame:CGRectMake(x,y, 300.0f140.0f)];

emojiView.backgroundColor = [UIColor lightGrayColor];

emojiView.alpha = 0.8;

emojiView.layer.cornerRadius = 6;

[emojiView.layer setMasksToBounds:YES];

 

UIScrollView *emojiScrollView = [[UIScrollView allocinit];

emojiScrollView.frame = CGRectMake(00 ,300.0f140.0f);

[emojiView addSubview:emojiScrollView];

 

int xIndex = 0;

int yIndex = 0;

 

int emojiRangeArray[10] = {0xE001,0xE05A,0xE101,0xE15A,0xE201,0xE253,0xE401,0xE44C,0xE501,0xE537};

 

for (int j = 0 ; j<10 ; j+=2 ) {

 

int startIndex = emojiRangeArray[j];

int endIndex = emojiRangeArray[j+1];

 

for (int i = startIndex ; i<= endIndex ; i++ ) {

UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];

button.frame = CGRectMake(6 + xIndex*326 + yIndex*3232.0f32.0f);

[button setTitle:[NSString stringWithFormat:@"%C", i]forState:UIControlStateNormal];

button.tag = i;

[button addTarget:self action:@selector(didSelectAFace:)forControlEvents:UIControlEventTouchUpInside];

[emojiScrollView addSubview:button];

 

xIndex += 1;

if (xIndex == 9) {

xIndex = 0;

yIndex += 1;

}

}

}

 

[emojiScrollView setContentSize:CGSizeMake(300.0f12 + (yIndex+1)*32)];

 

//closeButton

self.emojiCloseButton = [UIButton buttonWithType:UIButtonTypeCustom];

emojiCloseButton.frame = CGRectMake(x-10.0f , y-10.0f , 24.0f24.0f);

[emojiCloseButton setImage:[UIImage imageNamed:@"dialog_close.png"]forState:UIControlStateNormal];

[emojiCloseButton addTarget:self action:@selector(hideEmojiView)forControlEvents:UIControlEventTouchUpInside];

 

}

else {

emojiView.frame = CGRectMake(x,y, 300.0f140.0f);

emojiCloseButton.frame = CGRectMake(x-10.0f , y-10.0f , 24.0f24.0f);

}

 

[self.view addSubview:emojiView];

[self.view addSubview:emojiCloseButton];

 

}

 

iPhone Emoji Decimal Character Entities

The complete list of iPhone emoji and their respective decimal character entities:

e415&#xe415; e056&#xe056; e057&#xe057; e414&#xe414; e405&#xe405; e106&#xe106; e418&#xe418;
e417&#xe417; e40d&#xe40d; e40a&#xe40a; e404&#xe404; e105&#xe105; e409&#xe409; e40e&#xe40e;
e402&#xe402; e108&#xe108; e403&#xe403; e058&#xe058; e407&#xe407; e401&#xe401; e40f&#xe40f;
e40b&#xe40b; e406&#xe406; e413&#xe413; e411&#xe411; e412&#xe412; e410&#xe410; e107&#xe107;
e059&#xe059; e416&#xe416; e408&#xe408; e40c&#xe40c; e11a&#xe11a; e10c&#xe10c; e32c&#xe32c;
e32a&#xe32a; e32d&#xe32d; e328&#xe328; e32b&#xe32b; e022&#xe022; e023&#xe023; e327&#xe327;
e329&#xe329; e32e&#xe32e; e32f&#xe32f; e335&#xe335; e334&#xe334; e021&#xe021; e337&#xe337;
e020&#xe020; e336&#xe336; e13c&#xe13c; e330&#xe330; e331&#xe331; e326&#xe326; e03e&#xe03e;
e11d&#xe11d; e05a&#xe05a; e00e&#xe00e; e421&#xe421; e420&#xe420; e00d&#xe00d; e010&#xe010;
e011&#xe011; e41e&#xe41e; e012&#xe012; e422&#xe422; e22e&#xe22e; e22f&#xe22f; e231&#xe231;
e230&#xe230; e427&#xe427; e41d&#xe41d; e00f&#xe00f; e41f&#xe41f; e14c&#xe14c; e201&#xe201;
e115&#xe115; e428&#xe428; e51f&#xe51f; e429&#xe429; e424&#xe424; e423&#xe423; e253&#xe253;
e426&#xe426; e111&#xe111; e425&#xe425; e31e&#xe31e; e31f&#xe31f; e31d&#xe31d; e001&#xe001;
e002&#xe002; e005&#xe005; e004&#xe004; e51a&#xe51a; e519&#xe519; e518&#xe518; e515&#xe515;
e516&#xe516; e517&#xe517; e51b&#xe51b; e152&#xe152; e04e&#xe04e; e51c&#xe51c; e51e&#xe51e;
e11c&#xe11c; e536&#xe536; e003&#xe003; e41c&#xe41c; e41b&#xe41b; e419&#xe419; e41a&#xe41a;
e04a&#xe04a; e04b&#xe04b; e049&#xe049; e048&#xe048; e04c&#xe04c; e13d&#xe13d; e443&#xe443;
e43e&#xe43e; e04f&#xe04f; e052&#xe052; e053&#xe053; e524&#xe524; e52c&#xe52c; e52a&#xe52a;
e531&#xe531; e050&#xe050; e527&#xe527; e051&#xe051; e10b&#xe10b; e52b&#xe52b; e52f&#xe52f;
e528&#xe528; e01a&#xe01a; e134&#xe134; e530&#xe530; e529&#xe529; e526&#xe526; e52d&#xe52d;
e521&#xe521; e523&#xe523; e52e&#xe52e; e055&#xe055; e525&#xe525; e10a&#xe10a; e109&#xe109;
e522&#xe522; e019&#xe019; e054&#xe054; e520&#xe520; e306&#xe306; e030&#xe030; e304&#xe304;
e110&#xe110; e032&#xe032; e305&#xe305; e303&#xe303; e118&#xe118; e447&#xe447; e119&#xe119;
e307&#xe307; e308&#xe308; e444&#xe444; e441&#xe441;      
e436&#xe436; e437&#xe437; e438&#xe438; e43a&#xe43a; e439&#xe439; e43b&#xe43b; e117&#xe117;
e440&#xe440; e442&#xe442; e446&#xe446; e445&#xe445; e11b&#xe11b; e448&#xe448; e033&#xe033;
e112&#xe112; e325&#xe325; e312&#xe312; e310&#xe310; e126&#xe126; e127&#xe127; e008&#xe008;
e03d&#xe03d; e00c&#xe00c; e12a&#xe12a; e00a&#xe00a; e00b&#xe00b; e009&#xe009; e316&#xe316;
e129&#xe129; e141&#xe141; e142&#xe142; e317&#xe317; e128&#xe128; e14b&#xe14b; e211&#xe211;
e114&#xe114; e145&#xe145; e144&#xe144; e03f&#xe03f; e313&#xe313; e116&#xe116; e10f&#xe10f;
e104&#xe104; e103&#xe103; e101&#xe101; e102&#xe102; e13f&#xe13f; e140&#xe140; e11f&#xe11f;
e12f&#xe12f; e031&#xe031; e30e&#xe30e; e311&#xe311; e113&#xe113; e30f&#xe30f; e13b&#xe13b;
e42b&#xe42b; e42a&#xe42a; e018&#xe018; e016&#xe016; e015&#xe015; e014&#xe014; e42c&#xe42c;
e42d&#xe42d; e017&#xe017; e013&#xe013; e20e&#xe20e; e20c&#xe20c; e20f&#xe20f; e20d&#xe20d;
e131&#xe131; e12b&#xe12b; e130&#xe130; e12d&#xe12d; e324&#xe324; e301&#xe301; e148&#xe148;
e502&#xe502; e03c&#xe03c; e30a&#xe30a; e042&#xe042; e040&#xe040; e041&#xe041; e12c&#xe12c;
e007&#xe007; e31a&#xe31a; e13e&#xe13e; e31b&#xe31b; e006&#xe006; e302&#xe302; e319&#xe319;
e321&#xe321; e322&#xe322; e314&#xe314; e503&#xe503; e10e&#xe10e; e318&#xe318; e43c&#xe43c;
e11e&#xe11e; e323&#xe323; e31c&#xe31c; e034&#xe034; e035&#xe035; e045&#xe045; e338&#xe338;
e047&#xe047; e30c&#xe30c; e044&#xe044; e30b&#xe30b; e043&#xe043; e120&#xe120; e33b&#xe33b;
e33f&#xe33f; e341&#xe341; e34c&#xe34c; e344&#xe344; e342&#xe342; e33d&#xe33d; e33e&#xe33e;
e340&#xe340; e34d&#xe34d; e339&#xe339; e147&#xe147; e343&#xe343; e33c&#xe33c; e33a&#xe33a;
e43f&#xe43f; e34b&#xe34b; e046&#xe046; e345&#xe345; e346&#xe346; e348&#xe348; e347&#xe347;
e34a&#xe34a; e349&#xe349;          
e036&#xe036; e157&#xe157; e038&#xe038; e153&#xe153; e155&#xe155; e14d&#xe14d; e156&#xe156;
e501&#xe501; e158&#xe158; e43d&#xe43d; e037&#xe037; e504&#xe504; e44a&#xe44a; e146&#xe146;
e50a&#xe50a; e505&#xe505; e506&#xe506; e122&#xe122; e508&#xe508; e509&#xe509; e03b&#xe03b;
e04d&#xe04d; e449&#xe449; e44b&#xe44b; e51d&#xe51d; e44c&#xe44c; e124&#xe124; e121&#xe121;
e433&#xe433; e202&#xe202; e135&#xe135; e01c&#xe01c; e01d&#xe01d; e10d&#xe10d; e136&#xe136;
e42e&#xe42e; e01b&#xe01b; e15a&#xe15a; e159&#xe159; e432&#xe432; e430&#xe430; e431&#xe431;
e42f&#xe42f; e01e&#xe01e; e039&#xe039; e435&#xe435; e01f&#xe01f; e125&#xe125; e03a&#xe03a;
e14e&#xe14e; e252&#xe252; e137&#xe137; e209&#xe209; e154&#xe154; e133&#xe133; e150&#xe150;
e320&#xe320; e123&#xe123; e132&#xe132; e143&#xe143; e50b&#xe50b; e514&#xe514; e513&#xe513;
e50c&#xe50c; e50d&#xe50d; e511&#xe511; e50f&#xe50f; e512&#xe512; e510&#xe510; e50e&#xe50e;
e21c&#xe21c; e21d&#xe21d; e21e&#xe21e; e21f&#xe21f; e220&#xe220; e221&#xe221; e222&#xe222;
e223&#xe223; e224&#xe224; e225&#xe225; e210&#xe210; e232&#xe232; e233&#xe233; e235&#xe235;
e234&#xe234; e236&#xe236; e237&#xe237; e238&#xe238; e239&#xe239; e23b&#xe23b; e23a&#xe23a;
e23d&#xe23d; e23c&#xe23c; e24d&#xe24d; e212&#xe212; e24c&#xe24c; e213&#xe213; e214&#xe214;
e507&#xe507; e203&#xe203; e20b&#xe20b; e22a&#xe22a; e22b&#xe22b; e226&#xe226; e227&#xe227;
e22c&#xe22c; e22d&#xe22d; e215&#xe215; e216&#xe216; e217&#xe217; e218&#xe218; e228&#xe228;
e151&#xe151; e138&#xe138; e139&#xe139; e13a&#xe13a; e208&#xe208; e14f&#xe14f; e20a&#xe20a;
e434&#xe434; e309&#xe309; e315&#xe315; e30d&#xe30d; e207&#xe207; e229&#xe229; e206&#xe206;
e205&#xe205; e204&#xe204; e12e&#xe12e; e250&#xe250; e251&#xe251; e14a&#xe14a; e149&#xe149;
e23f&#xe23f; e240&#xe240; e241&#xe241; e242&#xe242; e243&#xe243; e244&#xe244; e245&#xe245;
e246&#xe246; e247&#xe247; e248&#xe248; e249&#xe249; e24a&#xe24a; e24b&#xe24b; e23e&#xe23e;
e532&#xe532; e533&#xe533; e534&#xe534; e535&#xe535; e21a&#xe21a; e219&#xe219; e21b&#xe21b;
e02f&#xe02f; e024&#xe024; e025&#xe025; e026&#xe026; e027&#xe027; e028&#xe028; e029&#xe029;
e02a&#xe02a; e02b&#xe02b; e02c&#xe02c; e02d&#xe02d; e02e&#xe02e; e332&#xe332; e333&#xe333;
e24e&#xe24e; e24f&#xe24f; e537&#xe537;        

转载地址:http://pukupi.com/post/1964/

2015-08-11 20:12:49 ziacke 阅读数 445

1.控件

UICollectionView+UIScrollerView (2个)
1个UIScrollerView 用于放所有的Emoji表情。
另一个UIScrollerView作为底部 selectBar样式,可以滚动选择

2.代码实现Emoji表情

所有的Emoji表情都有统一的Unicode编码 比如 �� 对应 \ue 056
参考[http://blog.csdn.net/csj1987/article/details/6662764

这样就很简单了 只要给每个label.text设置为Emoji表情的编码,则可以显示出来。

3.具体UI实现

利用UICollectionView, 对每个cell 填充一个UILabel ,但为了实现表情的删除功能,我用了UIImageView+UILabel. 因为最后一个Emoji表情换为 设置UIImageview的image.自行上网找一张删除按钮图片。

UI库 [http://www.iconfont.cn

计算方面:对于iphone5,每页基本放21个表情,包含最后的删除。
则通过计算页数,设置uiscrollerview的contentsize.再设置pageEnable=YES

这样子,emoji表情的滑动切换也实现了。

再实现下方表情的选择bar还有后面的点击按钮基本就可以了。

4.删除功能的实现

简单粗暴:附上代码即能明白
NSUInteger lastCharIndex = [myString length] - 1; // I assume string is not empty
NSRange rangeOfLastChar = [myString rangeOfComposedCharacterSequenceAtIndex: lastCharIndex];
myNewString = [myString substringToIndex: rangeOfLastChar.location];

参考 [http://stackoverflow.com/questions/11759855/how-to-remove-the-last-unicode-symbol-from-nsstring]

效果图:
列表内容

IOS Emoji 编码打印

阅读数 30373

没有更多推荐了,返回首页