我正在尋找一些文檔來找到UILocalNotification
的alertBody
的最大長度,然後它將在通知中心(橫幅)或彈出警報中被剪輯。Objective-C - UILocalNotification alertBody length
2
A
回答
2
嗯,這不是那麼容易。它也取決於字符寬度。我想你只需要騰出空間來支持不同的字符寬度。
3
我還沒有找到任何具體的限制記錄。但是,您可以嘗試一下,看看通知下拉顯示大約80個字符。這是在iOS 7.1的iPhone 5S上。 通知中心顯示更多消息。在這種情況下,在開始截斷之前大約有138個字符。
當然,按比例分配空間字體的字符數取決於這些字符的寬度,iPhone的寬度顯示文本的寬度要比iPad低,未來的iOS版本可能會更改此設置。
相關問題
- 1. 取消UILocalNotification
- 2. UILocalNotification自定義的聲音名稱只在指定alertBody時振動手機(不像UILocalNotificationDefaultSoundName)?
- 3. 如何重複UILocalNotification聲音
- 4. UILocalNotification
- 5. UILocalNotification特殊字符警報正文
- 6. NumberFormatter - ObjectiveC
- 7. javascript testing .length和.length> 0
- 8. UILocalNotification在後臺 - iOS 9
- 9. 帶有UILocalNotification和DetailViewController的TableView
- 10. ObjectiveC MailCore郵件正文
- 11. 孤兒UILocalNotification - 已確認
- 12. Multi UILocalNotification
- 13. UIlocalNotification體
- 14. UILocalNotification repeatInterval
- 15. 爲UILocalNotification
- 16. Javascript .Length()
- 17. Swift:import ObjectiveC vs Foundation
- 18. ObjectiveC中的MulticastDelegate
- 19. 中的ObjectiveC
- 20. 在的ObjectiveC
- 21. 在的ObjectiveC
- 22. JSON ObjectiveC - 錯誤
- 23. Curl,Asana&ObjectiveC
- 24. 在的ObjectiveC
- 25. 在的ObjectiveC
- 26. 在iOS中顯示UILocalNOtification提醒VOIP電話有效
- 27. 「hello」.length和「hello」.length是什麼區別?
- 28. ObjectiveC隨機數字
- 29. 突破在的ObjectiveC
- 30. ObjectiveC項目組織
有一個來源,出於利益? –