开发者社区> 问答> 正文

移动推送 iOS : 如何让推送内容自动换行?

移动推送 iOS : 如何让推送内容自动换行?

展开
收起
保持可爱mmm 2020-03-27 23:50:31 903 0
1 条回答
写回答
取消 提交回答
  • 在 body 里的 字符串中 添加 \n 达到换行的效果 ,代码示例如下 :

    { "aps": { "alert": { "title": "title", "subtitle": "subtitle", "body": "This is some fancy message. \nThis is some fancy message. \nThis is some fancy message. \nThis is some fancy message. " }, "badge": 1, "sound": "default", "category": "test_category", "mutable-content": 1 }, "key1":"value1", "key2":"value2" }

    2020-03-27 23:53:46
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
手淘iOS性能优化探索 立即下载
From Java/Android to Swift iOS 立即下载
深入剖析iOS性能优化 立即下载