{"_id":"55781fe45129590d003ff51e","category":{"_id":"55781fe35129590d003ff4fb","version":"55781fe25129590d003ff4f7","__v":11,"pages":["55781fe45129590d003ff517","55781fe45129590d003ff518","55781fe45129590d003ff519","55781fe45129590d003ff51a","55781fe45129590d003ff51b","55781fe45129590d003ff51c","55781fe45129590d003ff51d","55781fe45129590d003ff51e","55781fe45129590d003ff51f","55781fe45129590d003ff520","55781fe45129590d003ff521","55781fe45129590d003ff522","5579ab5fc7fb3f2100096fad","55f7de1660cc850d008a7a22","55f7e1fbe32e9b0d00a2d4d0","561f72bacec1a50d00979598","561f764f61c0521700acc428","563337539c607719001b85dd","564318f1f49bfa0d002f5566","564f03454f000617007bd670","565ee80a23fd5f0d00a129f9","56793cd73473bc0d008e141b"],"project":"54aa7f773b56130b0056c86e","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-01-05T12:43:51.897Z","from_sync":false,"order":3,"slug":"ios-sdk","title":"iOS SDK"},"project":"54aa7f773b56130b0056c86e","__v":16,"githubsync":"","parentDoc":null,"user":"54aa7f3f9bb00c0b00cb899b","version":{"_id":"55781fe25129590d003ff4f7","project":"54aa7f773b56130b0056c86e","forked_from":"54aa7f773b56130b0056c871","__v":6,"createdAt":"2015-06-10T11:30:42.700Z","releaseDate":"2015-06-10T11:30:42.700Z","categories":["55781fe35129590d003ff4f8","55781fe35129590d003ff4f9","55781fe35129590d003ff4fa","55781fe35129590d003ff4fb","55781fe35129590d003ff4fc","55781fe35129590d003ff4fd","55781fe35129590d003ff4fe","564bbc7e8841060d00abb2ee","565b66c446118c0d00dcb0bb","56898269f8dc340d00308c13","582318b23b961a0f009516a1","594a848c9f4771001a43c959"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"Developers","version_clean":"2.0.0","version":"2.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-05-18T11:41:35.663Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"settings":"","results":{"codes":[]},"auth":"required","params":[],"url":""},"isReference":false,"order":8,"body":"[block:callout]\n{\n  \"type\": \"success\",\n  \"body\": \"Please make sure that you're familiar with the [Running the Pulsate SDK](https://pulsate.readme.io/v2.0/docs/running-the-pulsate-sdk) tutorial.\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"danger\",\n  \"title\": \"Feed Orientation\",\n  \"body\": \"We've designed the Pulsate Feed in Portrait mode in mind. It's highly recommended to use it in Portrait mode exclusively. Using landscape mode is possible, but not recommended for best UX experience.\"\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/2zY6zwmSjORe079FbFRV_Screen%20Shot%202015-11-17%20at%2010.19.41.png\",\n        \"Screen Shot 2015-11-17 at 10.19.41.png\",\n        \"1518\",\n        \"584\",\n        \"#152640\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\nOne of the core parts of the Pulsate SDK is the in-app Feed. The Feed is a fully featured interface that sits directly within your mobile App, it allows incoming campaign and conversation content to be rendered to your customers. It also allows customers to compose new messages directly to you.\n[block:image]\n{\n  \"images\": [\n    {\n      \"caption\": \"\",\n      \"image\": [\n        \"https://files.readme.io/WyyVqFK0SyKQjQfPCHMq_Screen%20Shot%202015-06-12%20at%2013.47.02.png\",\n        \"Screen Shot 2015-06-12 at 13.47.02.png\",\n        \"373\",\n        \"645\",\n        \"#5d3026\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\nWhen a customer opens a Pulsate Push Notification, your mobile App will start and the message inbox will open up and display the associated content automatically. After the user has read the campaign / conversation content they will dismiss the Feed and go back to the main App.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/nCf8Ht2pRmOWvgyudhSa_06m289crQ32a6GxVXk5B.png\",\n        \"06m289crQ32a6GxVXk5B.png\",\n        \"320\",\n        \"568\",\n        \"#048a61\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\nIts reasonable to assume that your customer will want to be able to navigate to the Feed at a later date to either read a message again, or to compose a new message to you. However unless you explicitly provide a button / UI element linking back to the inbox, your customers will not be able to access it again.\n\nThe *PULPulsateManager* object returns a *UINavigationController* that you can present in: \n• *UIViewController* using *presentViewController*\n• *UITabBarController*\n• *UISplitViewController*\n\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"// You can decide if you want the floating new thread button in Feed to be visible\\n// This is optional, the floating button is visible by default:\\n[manager setNewThreadButtonEnabled:YES];\\n\\nUINavigationController* pulsateFeedNavController = [pulsateManager getFeedNavigationController];\\n\\n// present the Pulsate Navigation Controller\",\n      \"language\": \"objectivec\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"// You can decide if you want the floating new thread button in Feed to be visible\\n// This is optional, the floating button is visible by default:\\nmanager.newThreadButtonEnabled(true)\\n\\nvar pulsateFeedNavController: UINavigationController = pulsateManager.getFeedNavigationController()\\n\\n// present the Pulsate Navigation Controller \",\n      \"language\": \"swift\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Showing the Feed in a UISplitViewController\"\n}\n[/block]\nFor bigger screens like iPads you might want to use the UISplitViewController to show the feed in size it was designed for.\n\nCreate a *UISplitViewController* either in the graphic designer or in code and just show the Pulsate Feed navigation controller in the detail pane. It’s that simple:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[mySplitViewController showDetailViewController:pulsateNavigationController sender:nil]\\n\\n\\n/*The Pulsate Feed was designed with iPhones in mind which are narrow, meanwhile iPads are very wide in Landscape mode. In order to make the detail pane more narrow:*/\\n\\nmySplitViewController.maximumPrimaryColumnWidth = 1000000; // enter your maximum\\nmySplitViewController.preferredPrimaryColumnWidthFraction = 0.5 // it’ll be divided in half\\n\",\n      \"language\": \"objectivec\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"showing--hiding-the-message-inbox-1","type":"basic","title":"Showing / Hiding the Feed"}

Showing / Hiding the Feed


[block:callout] { "type": "success", "body": "Please make sure that you're familiar with the [Running the Pulsate SDK](https://pulsate.readme.io/v2.0/docs/running-the-pulsate-sdk) tutorial." } [/block] [block:callout] { "type": "danger", "title": "Feed Orientation", "body": "We've designed the Pulsate Feed in Portrait mode in mind. It's highly recommended to use it in Portrait mode exclusively. Using landscape mode is possible, but not recommended for best UX experience." } [/block] [block:image] { "images": [ { "image": [ "https://files.readme.io/2zY6zwmSjORe079FbFRV_Screen%20Shot%202015-11-17%20at%2010.19.41.png", "Screen Shot 2015-11-17 at 10.19.41.png", "1518", "584", "#152640", "" ] } ] } [/block] One of the core parts of the Pulsate SDK is the in-app Feed. The Feed is a fully featured interface that sits directly within your mobile App, it allows incoming campaign and conversation content to be rendered to your customers. It also allows customers to compose new messages directly to you. [block:image] { "images": [ { "caption": "", "image": [ "https://files.readme.io/WyyVqFK0SyKQjQfPCHMq_Screen%20Shot%202015-06-12%20at%2013.47.02.png", "Screen Shot 2015-06-12 at 13.47.02.png", "373", "645", "#5d3026", "" ] } ] } [/block] When a customer opens a Pulsate Push Notification, your mobile App will start and the message inbox will open up and display the associated content automatically. After the user has read the campaign / conversation content they will dismiss the Feed and go back to the main App. [block:image] { "images": [ { "image": [ "https://files.readme.io/nCf8Ht2pRmOWvgyudhSa_06m289crQ32a6GxVXk5B.png", "06m289crQ32a6GxVXk5B.png", "320", "568", "#048a61", "" ] } ] } [/block] Its reasonable to assume that your customer will want to be able to navigate to the Feed at a later date to either read a message again, or to compose a new message to you. However unless you explicitly provide a button / UI element linking back to the inbox, your customers will not be able to access it again. The *PULPulsateManager* object returns a *UINavigationController* that you can present in: • *UIViewController* using *presentViewController* • *UITabBarController* • *UISplitViewController* [block:code] { "codes": [ { "code": "// You can decide if you want the floating new thread button in Feed to be visible\n// This is optional, the floating button is visible by default:\n[manager setNewThreadButtonEnabled:YES];\n\nUINavigationController* pulsateFeedNavController = [pulsateManager getFeedNavigationController];\n\n// present the Pulsate Navigation Controller", "language": "objectivec" } ] } [/block] [block:code] { "codes": [ { "code": "// You can decide if you want the floating new thread button in Feed to be visible\n// This is optional, the floating button is visible by default:\nmanager.newThreadButtonEnabled(true)\n\nvar pulsateFeedNavController: UINavigationController = pulsateManager.getFeedNavigationController()\n\n// present the Pulsate Navigation Controller ", "language": "swift" } ] } [/block] [block:api-header] { "type": "basic", "title": "Showing the Feed in a UISplitViewController" } [/block] For bigger screens like iPads you might want to use the UISplitViewController to show the feed in size it was designed for. Create a *UISplitViewController* either in the graphic designer or in code and just show the Pulsate Feed navigation controller in the detail pane. It’s that simple: [block:code] { "codes": [ { "code": "[mySplitViewController showDetailViewController:pulsateNavigationController sender:nil]\n\n\n/*The Pulsate Feed was designed with iPhones in mind which are narrow, meanwhile iPads are very wide in Landscape mode. In order to make the detail pane more narrow:*/\n\nmySplitViewController.maximumPrimaryColumnWidth = 1000000; // enter your maximum\nmySplitViewController.preferredPrimaryColumnWidthFraction = 0.5 // it’ll be divided in half\n", "language": "objectivec" } ] } [/block]