{"action":"created","issue":{"url":"https://api.github.com/repos/NativeScript/NativeScript/issues/6091","repository_url":"https://api.github.com/repos/NativeScript/NativeScript","labels_url":"https://api.github.com/repos/NativeScript/NativeScript/issues/6091/labels{/name}","comments_url":"https://api.github.com/repos/NativeScript/NativeScript/issues/6091/comments","events_url":"https://api.github.com/repos/NativeScript/NativeScript/issues/6091/events","html_url":"https://github.com/NativeScript/NativeScript/issues/6091","id":342655060,"node_id":"MDU6SXNzdWUzNDI2NTUwNjA=","number":6091,"title":"Disable swipe back  using enableSwipeBackNavigation  doesn't work","user":{"login":"tsonevn","id":17448734,"node_id":"MDQ6VXNlcjE3NDQ4NzM0","avatar_url":"https://avatars3.githubusercontent.com/u/17448734?v=4","gravatar_id":"","url":"https://api.github.com/users/tsonevn","html_url":"https://github.com/tsonevn","followers_url":"https://api.github.com/users/tsonevn/followers","following_url":"https://api.github.com/users/tsonevn/following{/other_user}","gists_url":"https://api.github.com/users/tsonevn/gists{/gist_id}","starred_url":"https://api.github.com/users/tsonevn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsonevn/subscriptions","organizations_url":"https://api.github.com/users/tsonevn/orgs","repos_url":"https://api.github.com/users/tsonevn/repos","events_url":"https://api.github.com/users/tsonevn/events{/privacy}","received_events_url":"https://api.github.com/users/tsonevn/received_events","type":"User","site_admin":false},"labels":[{"id":203690306,"node_id":"MDU6TGFiZWwyMDM2OTAzMDY=","url":"https://api.github.com/repos/NativeScript/NativeScript/labels/os:%20ios","name":"os: ios","color":"006b75","default":false}],"state":"closed","locked":false,"assignee":{"login":"tsonevn","id":17448734,"node_id":"MDQ6VXNlcjE3NDQ4NzM0","avatar_url":"https://avatars3.githubusercontent.com/u/17448734?v=4","gravatar_id":"","url":"https://api.github.com/users/tsonevn","html_url":"https://github.com/tsonevn","followers_url":"https://api.github.com/users/tsonevn/followers","following_url":"https://api.github.com/users/tsonevn/following{/other_user}","gists_url":"https://api.github.com/users/tsonevn/gists{/gist_id}","starred_url":"https://api.github.com/users/tsonevn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsonevn/subscriptions","organizations_url":"https://api.github.com/users/tsonevn/orgs","repos_url":"https://api.github.com/users/tsonevn/repos","events_url":"https://api.github.com/users/tsonevn/events{/privacy}","received_events_url":"https://api.github.com/users/tsonevn/received_events","type":"User","site_admin":false},"assignees":[{"login":"tsonevn","id":17448734,"node_id":"MDQ6VXNlcjE3NDQ4NzM0","avatar_url":"https://avatars3.githubusercontent.com/u/17448734?v=4","gravatar_id":"","url":"https://api.github.com/users/tsonevn","html_url":"https://github.com/tsonevn","followers_url":"https://api.github.com/users/tsonevn/followers","following_url":"https://api.github.com/users/tsonevn/following{/other_user}","gists_url":"https://api.github.com/users/tsonevn/gists{/gist_id}","starred_url":"https://api.github.com/users/tsonevn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsonevn/subscriptions","organizations_url":"https://api.github.com/users/tsonevn/orgs","repos_url":"https://api.github.com/users/tsonevn/repos","events_url":"https://api.github.com/users/tsonevn/events{/privacy}","received_events_url":"https://api.github.com/users/tsonevn/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2018-07-19T09:42:30Z","updated_at":"2018-07-20T08:05:39Z","closed_at":"2018-07-20T08:05:39Z","author_association":"CONTRIBUTOR","body":"_From @RoyiNamir on July 18, 2018 20:57_\n\nI've created a new simple plain empty project : \r\n\r\n`tns create aaa --ng`\r\n\r\nIn the ctor of the items component , I did exactly what [this post suggests](https://discourse.nativescript.org/t/disabling-swipe-gestures-in-ios-preventing-navigation-back/3169/3)\r\n\r\n```\r\nconstructor(private page: Page) {\r\n        this.page.enableSwipeBackNavigation = false;\r\n}\r\n```\r\n\r\nBut the suggested code (also [in here](https://github.com/NativeScript/NativeScript/issues/3075) by @tsonevn ) - doesn't work in the latest version.\r\n\r\nAs you can see : I'm still able to drag the window : \r\n\r\n\r\n<img width=\"361\" alt=\"screen shot 2018-07-18 at 23 31 56\" src=\"https://user-images.githubusercontent.com/2842123/42907324-1e3ce118-8ae6-11e8-8747-de3f7996dad0.png\">\r\n\r\n\r\nIt happens in emulator and also on a real device.\r\n(nativescript 4.1)\r\n\r\nAttached sample project : https://ufile.io/umni8\n\n_Copied from original issue: NativeScript/ios-runtime#956_"},"comment":{"url":"https://api.github.com/repos/NativeScript/NativeScript/issues/comments/406521817","html_url":"https://github.com/NativeScript/NativeScript/issues/6091#issuecomment-406521817","issue_url":"https://api.github.com/repos/NativeScript/NativeScript/issues/6091","id":406521817,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNjUyMTgxNw==","user":{"login":"tsonevn","id":17448734,"node_id":"MDQ6VXNlcjE3NDQ4NzM0","avatar_url":"https://avatars3.githubusercontent.com/u/17448734?v=4","gravatar_id":"","url":"https://api.github.com/users/tsonevn","html_url":"https://github.com/tsonevn","followers_url":"https://api.github.com/users/tsonevn/followers","following_url":"https://api.github.com/users/tsonevn/following{/other_user}","gists_url":"https://api.github.com/users/tsonevn/gists{/gist_id}","starred_url":"https://api.github.com/users/tsonevn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsonevn/subscriptions","organizations_url":"https://api.github.com/users/tsonevn/orgs","repos_url":"https://api.github.com/users/tsonevn/repos","events_url":"https://api.github.com/users/tsonevn/events{/privacy}","received_events_url":"https://api.github.com/users/tsonevn/received_events","type":"User","site_admin":false},"created_at":"2018-07-20T08:05:38Z","updated_at":"2018-07-20T08:05:38Z","author_association":"CONTRIBUTOR","body":"HI @RoyiNamir,\r\nIn your case, you can try removing the gesture while using `removeGestureRecognizer`. For example:\r\nitems.component.ts\r\n```\r\nimport { Component, OnInit } from \"@angular/core\";\r\nimport {Page} from \"ui/page\"\r\nimport { Item } from \"./item\";\r\nimport { ItemService } from \"./item.service\";\r\nimport {RouterExtensions} from \"nativescript-angular/router\"\r\n@Component({\r\n    selector: \"ns-items\",\r\n    moduleId: module.id,\r\n    templateUrl: \"./items.component.html\",\r\n})\r\nexport class ItemsComponent implements OnInit {\r\n    items: Item[];\r\n\r\n    constructor(private itemService: ItemService, private page:Page, private router:RouterExtensions) { \r\n\r\n    }\r\n\r\n    ngOnInit(): void {\r\n        this.items = this.itemService.getItems();\r\n    }\r\n    ngAfterViewInit(){\r\n        setTimeout(() => {\r\n            this.page.frame.viewController.view.removeGestureRecognizer(this.page.frame.viewController.interactivePopGestureRecognizer)\r\n        }, 200);\r\n       \r\n    }\r\n}\r\n```\r\nI also logged a new [feature request](https://github.com/NativeScript/NativeScript/issues/6098) for providing a new property which will allow disabling the swipe back navigation globally."}}
{"actor":{"display_login":"tsonevn"}}