xinghelee
V2EX  ›  C

为什么从服务器返回的 JSON 字符串需要[NSString StringWithFormat]一次才能赋值给 Label.text

  •  
  •   xinghelee · Dec 26, 2014 · 2208 views
    This topic created in 4329 days ago, the information mentioned may be changed or developed.
    6 replies  •  2014-12-28 09:16:38 +08:00
    liubinging
    liubinging
    Dec 26, 2014❤️1
    1
    一直用AFNetworking,没遇到过。。
    可以加个短点,看看json串的类型是什么
    wingzki
    wingzki
    Dec 26, 2014❤️1
    2
    楼主用的什么JSON库,原生还是什么?
    LINAICAI
    LINAICAI
    Dec 26, 2014❤️1
    3
    Label.text只接受字符串类型吧
    [NSString StringWithFormat]是返回一个格式化的字符串
    xinghelee
    xinghelee
    OP
    Dec 27, 2014
    4
    用的AFNetworking ,服务端是用.net写的
    xinghelee
    xinghelee
    OP
    Dec 27, 2014
    5
    老大写的
    edward9941
    edward9941
    Dec 28, 2014 via iPhone
    6
    用的nsurlsession,没遇到过这样的情况
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   5106 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 07:42 · PVG 15:42 · LAX 23:42 · JFK 02:42
    ♥ Do have faith in what you're doing.