简体   繁体   中英

How to implement Facebook and Twitter notifications table in iPhone app

I am using Parse to deliver push notifications to my iPhone app. However, when I send notifications, they are getting cut off because they are too long. How can I make a notifications table so that when a user taps the notification, they are taken to a notifications table in the app that displays all notifications in their entirety?

Realistically, if the notification is too long to be displayed properly, it probably shouldn't be a notification in the first place. Hypothetically, you can pass the entire text of the notification you would like to display as a key-value pair in the notification payload and then use that to create a object in your app. You would have to create, add and cache the desired text in the payload and add it to your TableViewController's data source. You can use deep-linking from there to route to your custom notification table. In practice this is pretty round-about and not particularly reliable since notifications come in on a "best-try-but-no-promises" basis. If you're already using parse, you should probably consider creating objects there you can fetch with your desired info. Cloud code can handle object creation pretty easily for example.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM