Title: Feature request: Pull-to-refresh ListView · Issue #51 · NativeScript/NativeScript · GitHub
Open Graph Title: Feature request: Pull-to-refresh ListView · Issue #51 · NativeScript/NativeScript
X Title: Feature request: Pull-to-refresh ListView · Issue #51 · NativeScript/NativeScript
Description: From @truongsinh on April 9, 2015 18:31 I'm trying to implement "pull-to-refresh" myself with native iOS UIRefreshControl, however, I could not addTargetActionForControlEvents, the app crashes with segfault every time i pull class Refres...
Open Graph Description: From @truongsinh on April 9, 2015 18:31 I'm trying to implement "pull-to-refresh" myself with native iOS UIRefreshControl, however, I could not addTargetActionForControlEvents, the app crashes with...
X Description: From @truongsinh on April 9, 2015 18:31 I'm trying to implement "pull-to-refresh" myself with native iOS UIRefreshControl, however, I could not addTargetActionForControlEvents, the ap...
Opengraph URL: https://github.com/NativeScript/NativeScript/issues/51
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Feature request: Pull-to-refresh ListView","articleBody":"_From @truongsinh on April 9, 2015 18:31_\n\nI'm trying to implement \"pull-to-refresh\" myself with native iOS UIRefreshControl, however, I could not `addTargetActionForControlEvents`, the app crashes with segfault every time i pull\n\n``` typescript\n\nclass RefreshHandlerImpl extends NSObject {\n static new(): RefreshHandlerImpl {\n return \u003cRefreshHandlerImpl>super.new();\n }\n\n private _owner: UIRefreshControl;\n\n public initWithOwner(owner: UIRefreshControl): RefreshHandlerImpl {\n this._owner = owner;\n return this;\n }\n\n public \"myRefresh\" (sender: UIRefreshControl) {\n //console.log(\"refresh\")\n //this._owner._emit(eventReload);\n\n\n public static ObjCExposedMethods = {\n 'myRefresh': { returns: interop.types.void, params: [UIRefreshControl] }\n };\n}\n\n\n// Event handler for Page \"loaded\" event attached in main-page.xml\nexport function pageLoaded(args: EventData) {\n var page: Page = \u003cany>args.object;\n var postListView: ListView = view.getViewById(page, \"PostListView\");\n\n\n var refreshControl = new UIRefreshControl();\n var rHandler = RefreshHandlerImpl.new().initWithOwner(refreshControl);\n refreshControl.addTargetActionForControlEvents(rHandler, \"myRefresh\", UIControlEvents.UIControlEventValueChanged)\n postListView.ios.addSubview(refreshControl);\n\n\n page.bindingContext = mainViewModel;\n}\n\n```\n\n_Copied from original issue: NativeScript/cross-platform-modules#278_\n","author":{"url":"https://github.com/enchev","@type":"Person","name":"enchev"},"datePublished":"2015-04-24T12:47:21Z","url":"https://github.com/NativeScript/NativeScript/issues/51"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:34e50b29-5dc3-f72d-421a-e8f47786dca9 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D67C:361639:15B2648:1CEF0CD:6B013B01 |
| html-safe-nonce | b46fb1de208a2cdc830d2a030d2f9e7e1f45b7a34029e7ac326a6ac00f8c0de7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENjdDOjM2MTYzOToxNUIyNjQ4OjFDRUYwQ0Q6NkIwMTNCMDEiLCJ2aXNpdG9yX2lkIjoiNzc4Njg1NTg2NjQxNzg4ODAwMSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | ba31e539ba0dcd202a8a0579c9362cc9d93aca164a64ab619bf1547ee1940d7f |
| hovercard-subject-tag | issue:70681677 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/NativeScript/NativeScript/51/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a3f764673bd44e1789b82752325ec155ecb10e23a46f41ca953da04b52807ec7/NativeScript/NativeScript/issues/51 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a3f764673bd44e1789b82752325ec155ecb10e23a46f41ca953da04b52807ec7/NativeScript/NativeScript/issues/51 |
| og:image:alt | From @truongsinh on April 9, 2015 18:31 I'm trying to implement "pull-to-refresh" myself with native iOS UIRefreshControl, however, I could not addTargetActionForControlEvents, the app crashes with... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | enchev |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/NativeScript/NativeScript git https://github.com/NativeScript/NativeScript.git |
| octolytics-dimension-user_id | 7392261 |
| octolytics-dimension-user_login | NativeScript |
| octolytics-dimension-repository_id | 31492490 |
| octolytics-dimension-repository_nwo | NativeScript/NativeScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 31492490 |
| octolytics-dimension-repository_network_root_nwo | NativeScript/NativeScript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width