{ "id": "171331", "key": "TIMOB-25874", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "20115", "name": "Release 7.3.0", "archived": false, "released": true, "releaseDate": "2018-08-17" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2018-05-14T09:18:41.000+0000", "created": "2018-03-15T18:37:12.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "ios-11", "largetitleenabled", "refreshcontrol", "spinner" ], "versions": [ { "id": "19906", "description": "", "name": "Release 6.3.0", "archived": false, "released": true, "releaseDate": "2017-11-01" }, { "id": "19957", "description": "", "name": "Release 7.1.0", "archived": false, "released": true, "releaseDate": "2018-03-14" }, { "id": "20060", "description": "", "name": "Release 7.0.2", "archived": false, "released": true, "releaseDate": "2018-02-09" } ], "issuelinks": [], "assignee": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2018-06-20T15:42:05.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "Hi,\r\nI have created a simple navigationWindow in Alloy.\r\nThe Window has {{largeTitleEnabled: true}}, inside the window I have a simple listView with a refreshControl.\r\nWhen I run a Pull to Refresh the spinner is hidden by large-title.\r\n", "attachment": [ { "id": "64975", "filename": "328jD.png", "author": { "name": "flaviox83", "key": "flaviox83", "displayName": "Flavio Bontà", "active": true, "timeZone": "Europe/Rome" }, "created": "2018-03-16T09:15:57.000+0000", "size": 48360, "mimeType": "image/png" }, { "id": "64974", "filename": "Simulator Screen Shot - iPhone 8 - 2018-03-15 at 19.30.42.png", "author": { "name": "flaviox83", "key": "flaviox83", "displayName": "Flavio Bontà", "active": true, "timeZone": "Europe/Rome" }, "created": "2018-03-15T18:33:18.000+0000", "size": 79981, "mimeType": "image/png" }, { "id": "64973", "filename": "Simulator Screen Shot - iPhone 8 - 2018-03-15 at 19.30.45.png", "author": { "name": "flaviox83", "key": "flaviox83", "displayName": "Flavio Bontà", "active": true, "timeZone": "Europe/Rome" }, "created": "2018-03-15T18:33:18.000+0000", "size": 91436, "mimeType": "image/png" } ], "flagged": false, "summary": "iOS 11.2: Ti.UI.RefreshControl with Ti.UI.Window.largeTitleEnabled hides spinner", "creator": { "name": "flaviox83", "key": "flaviox83", "displayName": "Flavio Bontà", "active": true, "timeZone": "Europe/Rome" }, "subtasks": [], "reporter": { "name": "flaviox83", "key": "flaviox83", "displayName": "Flavio Bontà", "active": true, "timeZone": "Europe/Rome" }, "environment": "- Mac OS v10.12.6\r\n- Titanium SDK release v7.1.0.GA\r\n- node v8.9.3\r\n- npm v5.7.1\r\n- Simulator iPhone 8 iOS 11.2", "closedSprints": [ { "id": 1028, "state": "closed", "name": "2018 Sprint 09 SDK", "startDate": "2018-04-22T22:53:08.928Z", "endDate": "2018-05-06T22:53:00.000Z", "completeDate": "2018-05-07T00:02:15.883Z", "originBoardId": 114 }, { "id": 1018, "state": "closed", "name": "2018 Sprint 07 SDK", "startDate": "2018-03-25T21:59:36.637Z", "endDate": "2018-04-08T21:59:00.000Z", "completeDate": "2018-04-08T17:55:14.467Z", "originBoardId": 114 }, { "id": 1034, "state": "closed", "name": "2018 Sprint 10 SDK", "startDate": "2018-05-07T00:03:21.636Z", "endDate": "2018-05-21T00:03:00.000Z", "completeDate": "2018-05-20T20:54:58.928Z", "originBoardId": 114 }, { "id": 1021, "state": "closed", "name": "2018 Sprint 08 SDK", "startDate": "2018-04-08T17:57:36.122Z", "endDate": "2018-04-22T17:57:00.000Z", "completeDate": "2018-04-22T22:51:19.120Z", "originBoardId": 114 }, { "id": 1008, "state": "closed", "name": "2018 Sprint 06 SDK", "startDate": "2018-03-11T22:18:04.396Z", "endDate": "2018-03-25T22:18:00.000Z", "completeDate": "2018-03-25T21:52:36.683Z", "originBoardId": 216 } ], "comment": { "comments": [ { "id": "435657", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, Please share a full reproducible test code that regenerates the issue for iOS. Thanks.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2018-03-15T21:54:41.000+0000", "updated": "2018-03-15T21:54:41.000+0000" }, { "id": "435668", "author": { "name": "flaviox83", "key": "flaviox83", "displayName": "Flavio Bontà", "active": true, "timeZone": "Europe/Rome" }, "body": "Sorry!!\r\n{code:title=index.html|borderStyle=solid}\r\n\r\n\t\r\n\t\t\r\n\t\t\r\n\t\r\n\r\n{code}\r\n\r\n{code:title=index.tss|borderStyle=solid}\r\n\"#main\": {\r\n\ttitle: \"test\",\r\n\tlargeTitleEnabled: true\r\n}\r\n{code}\r\n\r\n{code:title=index.js|borderStyle=solid}\r\nvar counter = 0;\r\n\r\nfunction genData() {\r\n\tvar data = [];\r\n\tvar i = 1;\r\n\tfor (i = 1; i <= 3; i++) {\r\n\t\tdata.push({ properties: { title: 'ROW ' + (counter + i) } })\r\n\t}\r\n\tcounter += 3;\r\n\treturn data;\r\n}\r\n\r\nvar section = Ti.UI.createListSection();\r\nsection.setHeaderTitle(\"title\");\r\nsection.setItems(genData());\r\n\r\nvar control = Ti.UI.createRefreshControl({\r\n\ttintColor: 'red'\r\n})\r\n\r\nvar listView = Ti.UI.createListView({\r\n\tsections: [section],\r\n\trefreshControl: control\r\n});\r\n\r\ncontrol.addEventListener('refreshstart', function(e) {\r\n\tTi.API.info('refreshstart');\r\n\tsetTimeout(function() {\r\n\t\tTi.API.debug('Timeout');\r\n\t\tsection.appendItems(genData());\r\n\t\tcontrol.endRefreshing();\r\n\t}, 100); //if setTimeout is about 1s the problem not occurs\r\n})\r\n\r\n$.main.add(listView);\r\n$.index.open();\r\n{code}\r\n\r\nThe problem occurs when rest call (in this case simulated with a setTimeout 100ms) is too fast.\r\n\r\nIn native iOS, the spinner is over the navigationBar (as attachment)\r\n !328jD.png|thumbnail! \r\n", "updateAuthor": { "name": "flaviox83", "key": "flaviox83", "displayName": "Flavio Bontà", "active": true, "timeZone": "Europe/Rome" }, "created": "2018-03-16T09:17:02.000+0000", "updated": "2018-03-16T09:17:02.000+0000" }, { "id": "435678", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Really really interesting! The issue is that we use the {{addSubview}} approach for both iOS < 10 and iOS >= 10, but iOS >= 10 support the {{setRefreshControl:}} selector that is more proper for this. We will provide a fix for this later today and schedule it for one of the next releases. Thank you for reporting this!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-03-16T16:07:56.000+0000", "updated": "2018-03-16T16:07:56.000+0000" }, { "id": "435704", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "So this turned out to be more complex than initially thought: For iOS 10+, the {{refreshControl}} property is used instead of adding it as a sub-view - easy! But it also flickers when using together with largeTitleEnabled = true and extendEdges = Not set (or Ti.UI.EXTEND_EDGE_NONE = default). \r\n\r\nThats why a valid code looks like this:\r\n{code:js}\r\nvar window = Ti.UI.createWindow({\r\n backgroundColor: '#fff',\r\n title: 'Hello World',\r\n includeOpaqueBars: true,\r\n\tlargeTitleEnabled: true,\r\n extendEdges: [Ti.UI.EXTEND_EDGE_ALL]\r\n});\r\n\r\nvar nav = Ti.UI.iOS.createNavigationWindow({\r\n window: window\r\n});\r\n\r\nvar control = Ti.UI.createRefreshControl({\r\n})\r\n \r\nvar listView = Ti.UI.createListView({\r\n\tsections: [Ti.UI.createListSection({ items: [{ properties: { title: 'Test' } }] })],\r\n\trefreshControl: control\r\n});\r\n \r\ncontrol.addEventListener('refreshstart', function(e) {\r\n\tsetTimeout(function() {\r\n\t\tcontrol.endRefreshing();\r\n\t}, 1000); //if setTimeout is about 1s the problem not occurs\r\n})\r\n \r\nwindow.add(listView);\r\nnav.open();\r\n{code}\r\nThe only reason why many developers in the native world didn't see that before is because {{edgesForExtendedLayout}} (the native property behind {{extendEdges}}) is {{UIRectEdgeAll}} by default, but we use {{UIRectEdgeNone}} as the default. In Titanium SDK 8, we should change that default behavior to better match the native iOS behavior. I've added a new note to the Ti.UI.RefreshControl docs about this behavior as well and hope it's adopted by the developers.\r\n\r\nLet us know if there are follow-up questions regarding this!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-03-19T00:01:45.000+0000", "updated": "2018-03-19T00:01:45.000+0000" }, { "id": "435831", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR : https://github.com/appcelerator/titanium_mobile/pull/9942", "updateAuthor": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-03-22T03:36:28.000+0000", "updated": "2018-03-22T03:36:28.000+0000" }, { "id": "438561", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-06-20T15:41:50.000+0000", "updated": "2018-06-20T15:41:50.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }