{"action":"closed","number":126,"pull_request":{"url":"https://api.github.com/repos/NativeScript/NativeScript/pulls/126","id":34914479,"html_url":"https://github.com/NativeScript/NativeScript/pull/126","diff_url":"https://github.com/NativeScript/NativeScript/pull/126.diff","patch_url":"https://github.com/NativeScript/NativeScript/pull/126.patch","issue_url":"https://api.github.com/repos/NativeScript/NativeScript/issues/126","number":126,"state":"closed","locked":false,"title":"pull-to-refresh feature for iOS","user":{"login":"truongsinh","id":358585,"avatar_url":"https://avatars.githubusercontent.com/u/358585?v=3","gravatar_id":"","url":"https://api.github.com/users/truongsinh","html_url":"https://github.com/truongsinh","followers_url":"https://api.github.com/users/truongsinh/followers","following_url":"https://api.github.com/users/truongsinh/following{/other_user}","gists_url":"https://api.github.com/users/truongsinh/gists{/gist_id}","starred_url":"https://api.github.com/users/truongsinh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/truongsinh/subscriptions","organizations_url":"https://api.github.com/users/truongsinh/orgs","repos_url":"https://api.github.com/users/truongsinh/repos","events_url":"https://api.github.com/users/truongsinh/events{/privacy}","received_events_url":"https://api.github.com/users/truongsinh/received_events","type":"User","site_admin":false},"body":"https://github.com/NativeScript/NativeScript/issues/51\r\noptional pull-to-refresh feature for iOS (those for Android is being developed).\r\nWhen defining `ListView` XML, if there is xml attribute `refresh`, `ListView` automatically add `UIRefreshControl` view and handler.\r\nExample:\r\n```xml\r\n<!-- main-page.xml -->\r\n<Page xmlns=\"http://www.nativescript.org/tns.xsd\" loaded=\"pageLoaded\">\r\n\t<StackLayout>\r\n\t\t<ListView\r\n\t\t\titems=\"{{ postList }}\"\r\n\t\t\tisScrolling=\"{{ isScrolling }}\"\r\n\t\t\tloadMoreItems=\"listViewLoadMoreItems\"\r\n\t\t\trefresh=\"myRefreshFunction\"\r\n\t\t\t>\r\n\t\t\t<ListView.itemTemplate>\r\n\t\t\t\t<!-- truncated -->\r\n\t\t\t</ListView.itemTemplate>\r\n\t\t</ListView>\r\n\t</StackLayout>\r\n</Page>\r\n```\r\n```ts\r\n// main-page.ts\r\nexport function myRefreshFunction(args: RefreshEventData) {\r\n  mainViewModel.refresh()\r\n  .then(()=>{\r\n    args.done();\r\n    })\r\n  .catch(function(e) {\r\n    setTimeout(function() { throw e; });\r\n  });\r\n  ;\r\n}\r\n```","created_at":"2015-05-07T13:21:18Z","updated_at":"2015-05-28T10:27:04Z","closed_at":"2015-05-28T10:27:04Z","merged_at":null,"merge_commit_sha":"35b3bdf975020fa80a9f774e6e06c554e9333439","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/NativeScript/NativeScript/pulls/126/commits","review_comments_url":"https://api.github.com/repos/NativeScript/NativeScript/pulls/126/comments","review_comment_url":"https://api.github.com/repos/NativeScript/NativeScript/pulls/comments{/number}","comments_url":"https://api.github.com/repos/NativeScript/NativeScript/issues/126/comments","statuses_url":"https://api.github.com/repos/NativeScript/NativeScript/statuses/aa282913ef023416b538eba51cce6dfce703fb96","head":{"label":"Smarp:pull-to-refresh-ios-master","ref":"pull-to-refresh-ios-master","sha":"aa282913ef023416b538eba51cce6dfce703fb96","user":{"login":"Smarp","id":6417793,"avatar_url":"https://avatars.githubusercontent.com/u/6417793?v=3","gravatar_id":"","url":"https://api.github.com/users/Smarp","html_url":"https://github.com/Smarp","followers_url":"https://api.github.com/users/Smarp/followers","following_url":"https://api.github.com/users/Smarp/following{/other_user}","gists_url":"https://api.github.com/users/Smarp/gists{/gist_id}","starred_url":"https://api.github.com/users/Smarp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Smarp/subscriptions","organizations_url":"https://api.github.com/users/Smarp/orgs","repos_url":"https://api.github.com/users/Smarp/repos","events_url":"https://api.github.com/users/Smarp/events{/privacy}","received_events_url":"https://api.github.com/users/Smarp/received_events","type":"Organization","site_admin":false},"repo":{"id":35219801,"name":"NativeScript","full_name":"Smarp/NativeScript","owner":{"login":"Smarp","id":6417793,"avatar_url":"https://avatars.githubusercontent.com/u/6417793?v=3","gravatar_id":"","url":"https://api.github.com/users/Smarp","html_url":"https://github.com/Smarp","followers_url":"https://api.github.com/users/Smarp/followers","following_url":"https://api.github.com/users/Smarp/following{/other_user}","gists_url":"https://api.github.com/users/Smarp/gists{/gist_id}","starred_url":"https://api.github.com/users/Smarp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Smarp/subscriptions","organizations_url":"https://api.github.com/users/Smarp/orgs","repos_url":"https://api.github.com/users/Smarp/repos","events_url":"https://api.github.com/users/Smarp/events{/privacy}","received_events_url":"https://api.github.com/users/Smarp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Smarp/NativeScript","description":"Open Source framework for building cross-platform truly native iOS, Android and Windows mobile apps using JavaScript.","fork":true,"url":"https://api.github.com/repos/Smarp/NativeScript","forks_url":"https://api.github.com/repos/Smarp/NativeScript/forks","keys_url":"https://api.github.com/repos/Smarp/NativeScript/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Smarp/NativeScript/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Smarp/NativeScript/teams","hooks_url":"https://api.github.com/repos/Smarp/NativeScript/hooks","issue_events_url":"https://api.github.com/repos/Smarp/NativeScript/issues/events{/number}","events_url":"https://api.github.com/repos/Smarp/NativeScript/events","assignees_url":"https://api.github.com/repos/Smarp/NativeScript/assignees{/user}","branches_url":"https://api.github.com/repos/Smarp/NativeScript/branches{/branch}","tags_url":"https://api.github.com/repos/Smarp/NativeScript/tags","blobs_url":"https://api.github.com/repos/Smarp/NativeScript/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Smarp/NativeScript/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Smarp/NativeScript/git/refs{/sha}","trees_url":"https://api.github.com/repos/Smarp/NativeScript/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Smarp/NativeScript/statuses/{sha}","languages_url":"https://api.github.com/repos/Smarp/NativeScript/languages","stargazers_url":"https://api.github.com/repos/Smarp/NativeScript/stargazers","contributors_url":"https://api.github.com/repos/Smarp/NativeScript/contributors","subscribers_url":"https://api.github.com/repos/Smarp/NativeScript/subscribers","subscription_url":"https://api.github.com/repos/Smarp/NativeScript/subscription","commits_url":"https://api.github.com/repos/Smarp/NativeScript/commits{/sha}","git_commits_url":"https://api.github.com/repos/Smarp/NativeScript/git/commits{/sha}","comments_url":"https://api.github.com/repos/Smarp/NativeScript/comments{/number}","issue_comment_url":"https://api.github.com/repos/Smarp/NativeScript/issues/comments{/number}","contents_url":"https://api.github.com/repos/Smarp/NativeScript/contents/{+path}","compare_url":"https://api.github.com/repos/Smarp/NativeScript/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Smarp/NativeScript/merges","archive_url":"https://api.github.com/repos/Smarp/NativeScript/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Smarp/NativeScript/downloads","issues_url":"https://api.github.com/repos/Smarp/NativeScript/issues{/number}","pulls_url":"https://api.github.com/repos/Smarp/NativeScript/pulls{/number}","milestones_url":"https://api.github.com/repos/Smarp/NativeScript/milestones{/number}","notifications_url":"https://api.github.com/repos/Smarp/NativeScript/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Smarp/NativeScript/labels{/name}","releases_url":"https://api.github.com/repos/Smarp/NativeScript/releases{/id}","created_at":"2015-05-07T12:51:00Z","updated_at":"2015-05-07T13:14:55Z","pushed_at":"2015-05-28T10:27:04Z","git_url":"git://github.com/Smarp/NativeScript.git","ssh_url":"git@github.com:Smarp/NativeScript.git","clone_url":"https://github.com/Smarp/NativeScript.git","svn_url":"https://github.com/Smarp/NativeScript","homepage":"http://www.nativescript.org","size":6339,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"NativeScript:master","ref":"master","sha":"315959a59036085427289e88c65cd4c8986e2a4e","user":{"login":"NativeScript","id":7392261,"avatar_url":"https://avatars.githubusercontent.com/u/7392261?v=3","gravatar_id":"","url":"https://api.github.com/users/NativeScript","html_url":"https://github.com/NativeScript","followers_url":"https://api.github.com/users/NativeScript/followers","following_url":"https://api.github.com/users/NativeScript/following{/other_user}","gists_url":"https://api.github.com/users/NativeScript/gists{/gist_id}","starred_url":"https://api.github.com/users/NativeScript/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NativeScript/subscriptions","organizations_url":"https://api.github.com/users/NativeScript/orgs","repos_url":"https://api.github.com/users/NativeScript/repos","events_url":"https://api.github.com/users/NativeScript/events{/privacy}","received_events_url":"https://api.github.com/users/NativeScript/received_events","type":"Organization","site_admin":false},"repo":{"id":31492490,"name":"NativeScript","full_name":"NativeScript/NativeScript","owner":{"login":"NativeScript","id":7392261,"avatar_url":"https://avatars.githubusercontent.com/u/7392261?v=3","gravatar_id":"","url":"https://api.github.com/users/NativeScript","html_url":"https://github.com/NativeScript","followers_url":"https://api.github.com/users/NativeScript/followers","following_url":"https://api.github.com/users/NativeScript/following{/other_user}","gists_url":"https://api.github.com/users/NativeScript/gists{/gist_id}","starred_url":"https://api.github.com/users/NativeScript/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NativeScript/subscriptions","organizations_url":"https://api.github.com/users/NativeScript/orgs","repos_url":"https://api.github.com/users/NativeScript/repos","events_url":"https://api.github.com/users/NativeScript/events{/privacy}","received_events_url":"https://api.github.com/users/NativeScript/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/NativeScript/NativeScript","description":"Open Source framework for building cross-platform truly native iOS, Android and Windows mobile apps using JavaScript.","fork":false,"url":"https://api.github.com/repos/NativeScript/NativeScript","forks_url":"https://api.github.com/repos/NativeScript/NativeScript/forks","keys_url":"https://api.github.com/repos/NativeScript/NativeScript/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NativeScript/NativeScript/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NativeScript/NativeScript/teams","hooks_url":"https://api.github.com/repos/NativeScript/NativeScript/hooks","issue_events_url":"https://api.github.com/repos/NativeScript/NativeScript/issues/events{/number}","events_url":"https://api.github.com/repos/NativeScript/NativeScript/events","assignees_url":"https://api.github.com/repos/NativeScript/NativeScript/assignees{/user}","branches_url":"https://api.github.com/repos/NativeScript/NativeScript/branches{/branch}","tags_url":"https://api.github.com/repos/NativeScript/NativeScript/tags","blobs_url":"https://api.github.com/repos/NativeScript/NativeScript/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NativeScript/NativeScript/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NativeScript/NativeScript/git/refs{/sha}","trees_url":"https://api.github.com/repos/NativeScript/NativeScript/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NativeScript/NativeScript/statuses/{sha}","languages_url":"https://api.github.com/repos/NativeScript/NativeScript/languages","stargazers_url":"https://api.github.com/repos/NativeScript/NativeScript/stargazers","contributors_url":"https://api.github.com/repos/NativeScript/NativeScript/contributors","subscribers_url":"https://api.github.com/repos/NativeScript/NativeScript/subscribers","subscription_url":"https://api.github.com/repos/NativeScript/NativeScript/subscription","commits_url":"https://api.github.com/repos/NativeScript/NativeScript/commits{/sha}","git_commits_url":"https://api.github.com/repos/NativeScript/NativeScript/git/commits{/sha}","comments_url":"https://api.github.com/repos/NativeScript/NativeScript/comments{/number}","issue_comment_url":"https://api.github.com/repos/NativeScript/NativeScript/issues/comments{/number}","contents_url":"https://api.github.com/repos/NativeScript/NativeScript/contents/{+path}","compare_url":"https://api.github.com/repos/NativeScript/NativeScript/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NativeScript/NativeScript/merges","archive_url":"https://api.github.com/repos/NativeScript/NativeScript/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NativeScript/NativeScript/downloads","issues_url":"https://api.github.com/repos/NativeScript/NativeScript/issues{/number}","pulls_url":"https://api.github.com/repos/NativeScript/NativeScript/pulls{/number}","milestones_url":"https://api.github.com/repos/NativeScript/NativeScript/milestones{/number}","notifications_url":"https://api.github.com/repos/NativeScript/NativeScript/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NativeScript/NativeScript/labels{/name}","releases_url":"https://api.github.com/repos/NativeScript/NativeScript/releases{/id}","created_at":"2015-03-01T09:47:08Z","updated_at":"2015-05-28T09:36:28Z","pushed_at":"2015-05-28T06:39:02Z","git_url":"git://github.com/NativeScript/NativeScript.git","ssh_url":"git@github.com:NativeScript/NativeScript.git","clone_url":"https://github.com/NativeScript/NativeScript.git","svn_url":"https://github.com/NativeScript/NativeScript","homepage":"http://www.nativescript.org","size":8098,"stargazers_count":3579,"watchers_count":3579,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":217,"mirror_url":null,"open_issues_count":86,"forks":217,"open_issues":86,"watchers":3579,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/NativeScript/NativeScript/pulls/126"},"html":{"href":"https://github.com/NativeScript/NativeScript/pull/126"},"issue":{"href":"https://api.github.com/repos/NativeScript/NativeScript/issues/126"},"comments":{"href":"https://api.github.com/repos/NativeScript/NativeScript/issues/126/comments"},"review_comments":{"href":"https://api.github.com/repos/NativeScript/NativeScript/pulls/126/comments"},"review_comment":{"href":"https://api.github.com/repos/NativeScript/NativeScript/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/NativeScript/NativeScript/pulls/126/commits"},"statuses":{"href":"https://api.github.com/repos/NativeScript/NativeScript/statuses/aa282913ef023416b538eba51cce6dfce703fb96"}},"merged":false,"mergeable":false,"mergeable_state":"dirty","merged_by":null,"comments":12,"review_comments":0,"commits":1,"additions":48,"deletions":2,"changed_files":3}}