{"__v":4,"_id":"565f2996413e06170093de98","category":{"__v":18,"_id":"562014108a05d7230006ffad","pages":["562014118a05d7230006ffb6","562014118a05d7230006ffb7","562014118a05d7230006ffb8","562014118a05d7230006ffb9","562014118a05d7230006ffba","562014118a05d7230006ffbb","562014118a05d7230006ffbc","562014118a05d7230006ffbd","562014118a05d7230006ffbe","562014118a05d7230006ffbf","562014118a05d7230006ffc0","5620146f8a05d72300070013","565ed96ff76b8d0d0055422b","565f1bb623fd5f0d00a12a51","565f2996413e06170093de98","565f29db0dc99e1900f24ba8","565f2b23649b951900c89724","565f2b5d413e06170093de9e","5666d8b46819320d000c2e10","5666dd1866debc1700503e38","5666e3da5d00370d00ede577","5666ef36f672550d000851aa","5666f1116819320d000c2e3e","5666f7bf6819320d000c2e53","5672d7fe3cab740d00d15a48","56e961cef3c3031900041af4","56ebc03943304e2900e2116f","56f116a0ab5e790e00fb3950"],"project":"54861bb654b3ce0b00367292","version":"5620140f8a05d7230006ffac","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2014-12-08T21:55:25.679Z","from_sync":false,"order":0,"slug":"1-setup","title":"Onboarding/Moment integration"},"parentDoc":null,"project":"54861bb654b3ce0b00367292","user":"54861b9f3681d914006992a4","version":{"__v":3,"_id":"5620140f8a05d7230006ffac","project":"54861bb654b3ce0b00367292","createdAt":"2015-10-15T21:01:03.908Z","releaseDate":"2015-10-15T21:01:03.908Z","categories":["562014108a05d7230006ffad","562014108a05d7230006ffae","562014108a05d7230006ffaf","562014108a05d7230006ffb0","562014108a05d7230006ffb1","562014108a05d7230006ffb2","562014108a05d7230006ffb3","562014108a05d7230006ffb4","562014108a05d7230006ffb5","5666f7f5d784a70d00397bff","56967935b6d61f0d00acfb0b"],"is_deprecated":true,"is_hidden":false,"is_beta":false,"is_stable":false,"codename":"Moments","version_clean":"2.0.0","version":"2.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-12-02T17:25:42.967Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":8,"body":"Our call to action buttons gives you the basic capability like swiping between screens, closing the onboarding/moment and even linking to app store apps and more.\nBut actions are fully open for you to build what type of logic you wish that would happen when the user clicks on the button that is displayed.\n\nLet's see how it looks:\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[ElastiCode addActions::::at:::[\\n    [ECOnBoardingAction createWithName:@\\\"Show video\\\"\\n              action:^{\\n           \\t // video showing logic\\n                      }],\\n   [ECOnBoardingAction createWithName:@\\\"Ask for premission\\\"\\n             action:^{\\n    \\t\\t\\t\\t\\t\\t\\t\\t\\t// premission logic\\n           \\t\\t\\t\\t\\t  }]\\n         \\t\\t\\t  ]\\n     \\t];\",\n      \"language\": \"objectivec\"\n    },\n    {\n      \"code\": \"ElastiCode .addActions([\\n\\tECOnBoardingAction .createWithName(\\\"Show video\\\",\\n\\t\\taction: { () -> Void in\\n\\t\\t\\t// video showing logic\\n    }),\\n  ECOnBoardingAction .createWithName(\\\"Ask for premission\\\",\\n  \\taction: { () -> Void in\\n    \\t// premission logic\\n    })\\n    ]\\n)\",\n      \"language\": \"swift\"\n    }\n  ]\n}\n[/block]\nAnd from that point on it's in your dashboard.  You can now correlate between your proprietary​ logic and actions that occur on your screens\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/0NG8tGP9TgKIrWv6H4no_Screen-Shot-2015-12-08-at-3.02.52-PM.png\",\n        \"Screen-Shot-2015-12-08-at-3.02.52-PM.png\",\n        \"620\",\n        \"365\",\n        \"#468ac7\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]","excerpt":"Adding more functionality to your experience​","slug":"actions","type":"basic","title":"Actions"}

Actions

Adding more functionality to your experience​

Our call to action buttons gives you the basic capability like swiping between screens, closing the onboarding/moment and even linking to app store apps and more. But actions are fully open for you to build what type of logic you wish that would happen when the user clicks on the button that is displayed. Let's see how it looks: [block:code] { "codes": [ { "code": "[ElastiCode addActions:@[\n [ECOnBoardingAction createWithName:@\"Show video\"\n action:^{\n \t // video showing logic\n }],\n [ECOnBoardingAction createWithName:@\"Ask for premission\"\n action:^{\n \t\t\t\t\t\t\t\t\t// premission logic\n \t\t\t\t\t }]\n \t\t\t ]\n \t];", "language": "objectivec" }, { "code": "ElastiCode .addActions([\n\tECOnBoardingAction .createWithName(\"Show video\",\n\t\taction: { () -> Void in\n\t\t\t// video showing logic\n }),\n ECOnBoardingAction .createWithName(\"Ask for premission\",\n \taction: { () -> Void in\n \t// premission logic\n })\n ]\n)", "language": "swift" } ] } [/block] And from that point on it's in your dashboard. You can now correlate between your proprietary​ logic and actions that occur on your screens [block:image] { "images": [ { "image": [ "https://files.readme.io/0NG8tGP9TgKIrWv6H4no_Screen-Shot-2015-12-08-at-3.02.52-PM.png", "Screen-Shot-2015-12-08-at-3.02.52-PM.png", "620", "365", "#468ac7", "" ] } ] } [/block]