{ "id": "172752", "key": "TIMOB-26657", "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": "19882", "name": "Release 8.0.0", "archived": false, "released": true, "releaseDate": "2019-03-14" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2019-01-14T12:39:52.000+0000", "created": "2018-12-14T16:28:46.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [], "versions": [], "issuelinks": [ { "id": "57501", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "173487", "key": "AC-6220", "fields": { "summary": "iOS: 'masterIsOverlayed' covering up Detail View LeftNavButtons", "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" } }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2019-04-19T18:38:54.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": "See code below.\r\niPad 12.9 inch 2nd generation v12.1\r\nTi SDK 7.4.1GA\r\n\r\n\r\n*+Scenario A+*\r\nLaunch App and leave in full screen.\r\n- in Landscape - everything is fine. MasterView (on left) and DetailView (on right) are both what you'd expect.\r\n- in Portrait - everything is fine. The MasterView (on left) is truly 'overlayed' as defined in my .xml. You can press my Label, 'Toggle Master View', and as expected the MasterView is truly on top and when toggle off you can see the DetailView behind it.\r\n\r\n\r\n\r\n*+Scenario B+*\r\nLaunch App and then go into Split View (by dragging up the dock and opening any other app beside it) and divide the 2 apps 50/50 on the screen.\r\n{color:red}- in Landscape - THIS is where the issue exists. When you toggle, you can see the Ti.Gesture 'orientationchange' detects correctly that the view is \"Portrait\" (due to split screen). This is expected (even though the device is really in landscape - it operates as Portrait as defined by the SplitWindow). HOWEVER, the Master/Detail 'SplitWindow' are not behaving correctly. Try to toggle the MasterView and you'll notice that the DetailView is not behind it. The MasterView is NOT being overlayed as defined.{color}\r\n\r\n- in Portrait - everything is fine. The MasterView (on left) is truly 'overlayed' as expected and again you can press that toggle label to show the DetailView behind it.\r\n\r\n\r\n\r\n\r\nXML:\r\n{code:xml}\r\n\r\n\t\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\r\n\t\r\n\r\n{code}\r\n\r\nJAVASCRIPT\r\n\r\n{code:javascript}\r\nfunction toggleMasterView(){\r\n\t$.masterNavigationWindow.visible = !$.masterNavigationWindow.visible;\r\n}\r\nfunction onFirstLaunch(){\r\n\tsetTimeout(function() {\r\n\t\tupdateSplitViewUI(Ti.Gesture.portrait, Ti.Gesture.landscape);\r\n\t}, 200);\r\n}\r\n/**\r\n * \r\n * @param {Bool} isPortrait\r\n * @param {Bool} isLandscape\r\n */\r\nfunction updateSplitViewUI(isPortrait, isLandscape){\t\t//Ti.API.info(\"updateSplitView: (isPortrait:\" + isPortrait + \",isLandscape:\" + isLandscape + \")\");\r\n if (isLandscape) {\t\t\t\t\t\t\t//force show the Master Window in Landscape Mode\r\n \t\t$.masterNavigationWindow.visible = true;\r\n } \r\n}\r\nTi.App.addEventListener('resumed', function(){\r\n\tTi.API.info(\"App Resumed\");\r\n\tTi.Gesture.fireEvent('orientationchange');\r\n});\r\n\r\nTi.App.addEventListener('paused', function(){\r\n\tTi.API.info(\"App Paused\");\r\n});\r\n\r\nTi.Gesture.addEventListener('orientationchange',function(e) {\r\n\tupdateSplitViewUI(e.source.portrait, e.source.landscape);\r\n});\r\n{code}", "attachment": [ { "id": "65980", "filename": "image.png", "author": { "name": "bhouse", "key": "bhouse", "displayName": "Brenton House", "active": true, "timeZone": "America/Chicago" }, "created": "2018-12-14T18:46:42.000+0000", "size": 415772, "mimeType": "image/png" }, { "id": "65979", "filename": "Simulator Screen Shot - iPad Pro (12.9-inch) (2nd generation) - 2018-12-14 at 12.04.02.png", "author": { "name": "bhouse", "key": "bhouse", "displayName": "Brenton House", "active": true, "timeZone": "America/Chicago" }, "created": "2018-12-14T18:19:47.000+0000", "size": 1209031, "mimeType": "image/png" } ], "flagged": false, "summary": "iOS: 'masterIsOverlayed' not working when app is in Split View Mode & Landscape", "creator": { "name": "amwinsauto", "key": "amwinsauto", "displayName": "Adam Armstrong", "active": true, "timeZone": "America/Chicago" }, "subtasks": [], "reporter": { "name": "amwinsauto", "key": "amwinsauto", "displayName": "Adam Armstrong", "active": true, "timeZone": "America/Chicago" }, "environment": null, "closedSprints": [ { "id": 1106, "state": "closed", "name": "2019 Sprint 1", "startDate": "2018-12-31T19:39:58.070Z", "endDate": "2019-01-11T19:39:00.000Z", "completeDate": "2019-01-14T17:17:47.552Z", "originBoardId": 114 }, { "id": 1104, "state": "closed", "name": "2018 Sprint 26", "startDate": "2018-12-17T15:56:00.172Z", "endDate": "2018-12-21T15:56:00.000Z", "completeDate": "2018-12-26T17:42:17.145Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "444602", "author": { "name": "amwinsauto", "key": "amwinsauto", "displayName": "Adam Armstrong", "active": true, "timeZone": "America/Chicago" }, "body": "I was asked to attach a screenshot and/or explain how it impacts or block me.\r\n\r\nI chose Both.\r\n\r\nI am looking to extend an existing Titanium iPad app to support SplitView. In the process of planning to do that, and determine the amount of effort, I setup a simple playground app to test how it all works. While doing so, I used a simple inline YouTube Video Player to test the functionality. And in doing so (see attached screenshot), when in landscape orientation and split with another app - you can see that the MasterView takes up a significant portion of the left side of my app. Typically this is where masterIsOverlayed comes in and allows me to show/hide that as needed (just like the Native Apple Mail App) to regain that real estate.\r\n\r\nFor a real-life example - Appcelerator did a write-up a while back on how I was using Titanium to drive our business. In your write-up you can see how much data is on that screen. Now imagine splitting that view in half (for 2 apps side by side) and then imagine losing another 20% of that because masterIsOverlayed isn't working correctly.\r\nhttps://www.appcelerator.com/blog/2015/08/how-amwins-brings-mobile-agility-to-auto-insurance/\r\n\r\nPlease let me know if you need further information. But at the end of the day - the masterIsOverlayed is not working natively as designed by Apple. (again - see Apple Mail app for an example)\r\n\r\nThanks,\r\nAdam.\r\n", "updateAuthor": { "name": "amwinsauto", "key": "amwinsauto", "displayName": "Adam Armstrong", "active": true, "timeZone": "America/Chicago" }, "created": "2018-12-14T18:13:00.000+0000", "updated": "2018-12-14T18:13:00.000+0000" }, { "id": "444603", "author": { "name": "amwinsauto", "key": "amwinsauto", "displayName": "Adam Armstrong", "active": true, "timeZone": "America/Chicago" }, "body": "Even if you hid that MasterView entirely, or merged the stacked NavigationWindows, either would work better than taking up the space and not allowing the app to use it.", "updateAuthor": { "name": "amwinsauto", "key": "amwinsauto", "displayName": "Adam Armstrong", "active": true, "timeZone": "America/Chicago" }, "created": "2018-12-14T18:18:22.000+0000", "updated": "2018-12-14T18:18:22.000+0000" }, { "id": "444609", "author": { "name": "amwinsauto", "key": "amwinsauto", "displayName": "Adam Armstrong", "active": true, "timeZone": "America/Chicago" }, "body": "*Issue #1 (initial issue listed on this ticket)*\r\n* Image titled, \"Simulator Screen Shot - iPad Pro (12.9-inch) (2nd generation) - 2018-12-14 at 12.04.02.png\"\r\nshows how, when in Landscape Mode and using SplitView with another app, the left (MasterView) takes up a significant portion (~20%) of my app and even with masterIsOverlay defined it isn't being overlayed.\r\n\r\n*Issue #2*\r\n* Image titled, \"image.png\"\r\nshows another issue. If you are in Portrait Mode and NOT using SplitView, then when I set the left (MasterView) to visible=false, it DOES hide correctly....but then you can NOT click any of the leftNavButtons on the DetailView. I suspect this is because the left (MasterView) is obstructing the DetailView NavButtons with a hidden Window. We either need a way to click those NavButtons or some other method (than visible=false) to hide the MasterView Overlay.", "updateAuthor": { "name": "amwinsauto", "key": "amwinsauto", "displayName": "Adam Armstrong", "active": true, "timeZone": "America/Chicago" }, "created": "2018-12-14T18:56:16.000+0000", "updated": "2018-12-14T18:58:20.000+0000" }, { "id": "444610", "author": { "name": "amwinsauto", "key": "amwinsauto", "displayName": "Adam Armstrong", "active": true, "timeZone": "America/Chicago" }, "body": "*Issue #3*\r\nLook at the doc for SplitWindow - https://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.iOS.SplitWindow\r\n\r\nIn your example there is an eventListener 'visible' that, appears, should be fired when Master/Detail Views show/hide.....but it is not listed in 'Events'\r\n\r\nI could never get it to fire. Either there is some other defined method to show/hide a view that is not documented or if visible=true/false is the way to show/hide - then that listener is not firing.", "updateAuthor": { "name": "amwinsauto", "key": "amwinsauto", "displayName": "Adam Armstrong", "active": true, "timeZone": "America/Chicago" }, "created": "2018-12-14T19:00:40.000+0000", "updated": "2018-12-14T19:05:49.000+0000" }, { "id": "444689", "author": { "name": "amwinsauto", "key": "amwinsauto", "displayName": "Adam Armstrong", "active": true, "timeZone": "America/Chicago" }, "body": "I have done some more testing. If I go into SplitView with 2 apps side by side and I rotate the device multiple times from Portrait to Landscape and back/forth.....\r\nin Landscape (physical) orientation:\r\n Titanium reports \"Landscape\" but that is incorrect. When split with another app, the app should always behave as though it was Portrait, and because Titanium is not reporting that correctly, then in the class TiUIiOSSplitWindow.m - line #122\r\n\r\n{code:javascript}\r\nif (isPortrait) {\r\n CGFloat masterWidth = roundf(splitRatioPortrait * refSize.width);\r\n if (showMasterInPortrait) {\r\n if (masterIsOverlayed) {\r\n.....\r\n{code}\r\n\r\nthe top-level else gets executed, instead of the (isPortrait), and inside the else (ie. Landscape) there are no conditions for showMasterInPortrait & masterIsOveralyed. Which is to be expected if truly in Landscape and fullscreen.\r\n\r\n\r\nSo, I *think* Issue #1 is due to the incorrect assumption that if it is NOT in Portrait mode (see code/line mentioned above) then it must be Landscape. I think Issue #1 needs an additional condition/check for when it is in Landscape Mode to look for SplitView.\r\n\r\nMy suggestion would be to reverse the logic in lines 122-169 to something like:\r\n\r\n{code:javascript}\r\n if (isLandscape && !isSplitView) {\r\n // Side by side. Master+Detail occupy visible area\r\n } else {\r\n if (showMasterInPortrait) {\r\n if (masterIsOverlayed) {\r\n // Detail occupies visible area. Master on top\r\n } else {\r\n // Side by side. Master+Detail occupy visible area\r\n }\r\n } else {\r\n // Side by side. Detail in visible area. Master off screen to left.\r\n }\r\n }\r\n{code}\r\n\r\nI just dont know how enough about Objective-C to know how to determine isSplitView (that I added above)", "updateAuthor": { "name": "amwinsauto", "key": "amwinsauto", "displayName": "Adam Armstrong", "active": true, "timeZone": "America/Chicago" }, "created": "2018-12-18T15:13:32.000+0000", "updated": "2018-12-18T15:16:45.000+0000" }, { "id": "444697", "author": { "name": "amwinsauto", "key": "amwinsauto", "displayName": "Adam Armstrong", "active": true, "timeZone": "America/Chicago" }, "body": "ok. so I took a stab at it and I think I found the solution.\r\n\r\nIn the file: TiUIiOSSplitWindow.m\r\ninside: - (void)layoutSubviewsForOrientation:(UIInterfaceOrientation)orientation\r\n\r\n\r\nAdd this:\r\n\r\n{code:javascript}\r\nBOOL isRunningInFullScreen = CGRectEqualToRect([UIApplication sharedApplication].delegate.window.frame, [UIApplication sharedApplication].delegate.window.screen.bounds);\r\n{code}\r\n\r\nThen flip the logic to this:\r\n\r\n{code:javascript}\r\nif (!isPortrait && isRunningInFullScreen) {\r\n /*\r\n * Side by side. Master+Detail occupy visible area\r\n */\r\n CGFloat masterWidth = roundf(splitRatioLandscape * refSize.width);\r\n detailSize = CGSizeMake(refSize.width - masterWidth, refSize.height);\r\n masterSize = CGSizeMake(masterWidth, refSize.height);\r\n masterRect = CGRectMake(0, 0, masterSize.width, masterSize.height);\r\n masterCenter = CGPointMake(masterSize.width / 2, masterSize.height / 2);\r\n detailRect = CGRectMake(0, 0, detailSize.width, detailSize.height);\r\n detailCenter = CGPointMake(masterSize.width + (detailSize.width / 2), detailSize.height / 2);\r\n } else {\r\n CGFloat masterWidth = roundf(splitRatioPortrait * refSize.width);\r\n if (showMasterInPortrait) {\r\n if (masterIsOverlayed) {\r\n /*\r\n * Detail occupies visible area. Master on top.\r\n */\r\n detailSize = CGSizeMake(refSize.width, refSize.height);\r\n masterSize = CGSizeMake(masterWidth, refSize.height);\r\n masterRect = CGRectMake(0, 0, masterSize.width, masterSize.height);\r\n masterCenter = CGPointMake(masterSize.width / 2, masterSize.height / 2);\r\n detailRect = CGRectMake(0, 0, detailSize.width, detailSize.height);\r\n detailCenter = CGPointMake(detailSize.width / 2, detailSize.height / 2);\r\n } else {\r\n /*\r\n * Side by side. Master+Detail occupy visible area\r\n */\r\n masterSize = CGSizeMake(masterWidth, refSize.height);\r\n masterRect = CGRectMake(0, 0, masterSize.width, masterSize.height);\r\n masterCenter = CGPointMake(masterSize.width / 2, masterSize.height / 2);\r\n detailSize = CGSizeMake(refSize.width - masterSize.width, refSize.height);\r\n detailRect = CGRectMake(0, 0, detailSize.width, detailSize.height);\r\n detailCenter = CGPointMake(masterSize.width + (detailSize.width / 2), detailSize.height / 2);\r\n }\r\n\r\n } else {\r\n /*\r\n * Side by side. Detail in visible area. Master off screen to left.\r\n */\r\n detailSize = CGSizeMake(refSize.width, refSize.height);\r\n masterSize = CGSizeMake(masterWidth, refSize.height);\r\n masterRect = CGRectMake(0, 0, masterSize.width, masterSize.height);\r\n masterCenter = CGPointMake(-masterSize.width / 2, masterSize.height / 2);\r\n detailRect = CGRectMake(0, 0, detailSize.width, detailSize.height);\r\n detailCenter = CGPointMake(detailSize.width / 2, detailSize.height / 2);\r\n }\r\n }\r\n{code}", "updateAuthor": { "name": "amwinsauto", "key": "amwinsauto", "displayName": "Adam Armstrong", "active": true, "timeZone": "America/Chicago" }, "created": "2018-12-18T16:59:00.000+0000", "updated": "2018-12-18T16:59:00.000+0000" }, { "id": "444704", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hold on.\r\n\r\n{{Ti.Gesture}} is supposed to provide the device's orientation, not the app's orientation.\r\n\r\nYou already have the ability to detect the app's orientation. You can do so by comparing the window's width/height like the below.\r\n{code:javascript}\r\nwindow.addEventListener(\"postlayout\", function() {\r\n\tvar isPortrait = (window.size.height >= window.size.width);\r\n});\r\n{code}\r\n\r\nBut {{Ti.Gesture}} is the only means of determining the device's orientation. This API is important for fixed-orientation apps (such as portrait-only) that want to rotate the UI themselves. This is typically how a camera app works.\r\n\r\nPerhaps my above comments might be unrelated to your specific issue, but I wanted to make it clear how {{Ti.Gesture}} orientation is supposed to work.", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-12-18T19:00:17.000+0000", "updated": "2018-12-18T19:00:17.000+0000" }, { "id": "444705", "author": { "name": "amwinsauto", "key": "amwinsauto", "displayName": "Adam Armstrong", "active": true, "timeZone": "America/Chicago" }, "body": "I am most likely confusing the terminologies.\r\n\r\non an iPad, rotate to landscape, and open apple mail app. you see a splitview.\r\n\r\nnow slide up dock and open messages in split view. you'll instantly see the apple mail split view adjust and hide the MasterView - only showing the DetailView.\r\n\r\nif I use your event listener above - it only hides the MasterView and doesnt give the DetailView the entire width of the app.\r\n\r\nAll I am trying to say is that, when using masteroverlay, then it should truly be overlayed meaning the detailview takes up the entire screen.", "updateAuthor": { "name": "amwinsauto", "key": "amwinsauto", "displayName": "Adam Armstrong", "active": true, "timeZone": "America/Chicago" }, "created": "2018-12-18T19:07:28.000+0000", "updated": "2018-12-18T19:07:28.000+0000" }, { "id": "444706", "author": { "name": "amwinsauto", "key": "amwinsauto", "displayName": "Adam Armstrong", "active": true, "timeZone": "America/Chicago" }, "body": "if you are saying I should use my own logic/eventlistener like you did above, then we need methods to show/hide the masterView and expand/restrict the detailview size accordingly. I dont see those in the docs.", "updateAuthor": { "name": "amwinsauto", "key": "amwinsauto", "displayName": "Adam Armstrong", "active": true, "timeZone": "America/Chicago" }, "created": "2018-12-18T19:10:51.000+0000", "updated": "2018-12-18T19:10:51.000+0000" }, { "id": "444709", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "We may be talking about 2 different things here. Sorry.\r\n\r\nI agree that the overlay should fill the window. _(I'm not an iOS developer here. I'll wait for someone on the iOS team to comment on this.)_\r\n\r\nI just want to make it clear how {{Ti.Gesture}} orientation is supposed to work. It's an often misused feature. Let's forget about master overlay for the moment. If you hold the device \"landscape\" and put it into split-screen mode, {{Ti.Gesture}} will still return \"landscape\" (this is the device orientation) even though the app is displayed \"portrait\". This would be the correct behavior. On an Android tablet, split-screen mode gets a bit more interesting since you can drag the split-bar, which would resize the 2 apps... and can resize them to such as degree that 1 app would be landscape and the other portrait. My point being that using {{Ti.Gesture}} device orientation to layout content isn't the way to go. You have to look at the app window's size instead. (Probably not related to your master overlay issue, but wanted to make my point clear.)", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-12-18T19:27:57.000+0000", "updated": "2018-12-18T19:27:57.000+0000" }, { "id": "444710", "author": { "name": "amwinsauto", "key": "amwinsauto", "displayName": "Adam Armstrong", "active": true, "timeZone": "America/Chicago" }, "body": "I agree Ti.Gesture is correct.\r\n\r\nI was referring to orientation in the context of the SplitView determination of 'portrait' vs 'landscape' and the fact that if in landscape and split view - then it should *behave* as though portrait (meaning the master view is overalayed. Sorry for the confusion but yes, I agree with you the Ti.Gesture API us devs use appears to be fine.\r\n\r\nI wasn't sure how to describe the window constraints within splitview, but maybe you explained it best with your event listener example.\r\n\r\n", "updateAuthor": { "name": "amwinsauto", "key": "amwinsauto", "displayName": "Adam Armstrong", "active": true, "timeZone": "America/Chicago" }, "created": "2018-12-18T19:32:22.000+0000", "updated": "2018-12-18T19:32:22.000+0000" }, { "id": "444712", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Okay. I get what you're saying. Sorry if I added confusion to this. :)", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-12-18T19:43:42.000+0000", "updated": "2018-12-18T19:43:42.000+0000" }, { "id": "444713", "author": { "name": "amwinsauto", "key": "amwinsauto", "displayName": "Adam Armstrong", "active": true, "timeZone": "America/Chicago" }, "body": "Ha. No apology needed - I mis-used the terms.", "updateAuthor": { "name": "amwinsauto", "key": "amwinsauto", "displayName": "Adam Armstrong", "active": true, "timeZone": "America/Chicago" }, "created": "2018-12-18T19:46:41.000+0000", "updated": "2018-12-18T19:46:41.000+0000" }, { "id": "444732", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~amwinsauto] Thanks for raising the issue.\r\nIssue 1- In [document|https://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.iOS.SplitWindow] it is mentioned that-\r\n\"The property masterIsOverlayed controls how the master is displayed in portrait mode. When masterIsOverlayed is set to true, the detailView occupies the full screen and and masterView is displayed overlayed on top to the left of the screen. When masterIsOverlayed is set to false, the available screen width is split between the masterView and detailView\".\r\n\r\nWhich means that masterIsOverlayed property is supported for portrait mode only.\r\nBut I agree with you that masterIsOverlayed should be supported in landscape mode while using SplitView with another app.\r\n\r\nIssue 2- This is a bug. Need to look in this.\r\n\r\nIssue 3- 'visible' event is not supported in SDK. I am not sure why it is in document. Need to update document. Do you have any suggestion?\r\n\r\n ", "updateAuthor": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-12-19T10:02:19.000+0000", "updated": "2018-12-19T10:03:58.000+0000" }, { "id": "444733", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Classic app test case -\r\n\r\n{code:java}\r\n\r\nvar button = Ti.UI.createButton({ title: 'Click' });\r\n\r\nvar detail = Ti.UI.createWindow({ \r\n backgroundColor: 'white',\r\n leftNavButton: button\r\n});\r\nvar label1 = Ti.UI.createLabel({ text: 'Toggle Master View' });\r\ndetail.add(label1);\r\nvar detailNav = Ti.UI.createNavigationWindow({ window: detail });\r\n\r\n\r\nvar master = Ti.UI.createWindow({ backgroundColor: 'gray' });\r\nvar label2 = Ti.UI.createLabel({ text: 'Master View' });\r\nmaster.add(label2);\r\nvar masterNav = Ti.UI.createNavigationWindow({ window: master });\r\n\r\nvar splitWin = Ti.UI.iOS.createSplitWindow({\r\n detailView: detailNav,\r\n masterView: masterNav,\r\n showMasterInPortrait: true,\r\n masterIsOverlayed: true\r\n});\r\nsplitWin.open();\r\n\r\nbutton.addEventListener('click', function(e){\r\n Ti.API.info(\"Left button clicked\");\r\n});\r\n\r\nlabel1.addEventListener('click', function(e){\r\n masterNav.visible = !masterNav.visible;\r\n});\r\n\r\nsplitWin.addEventListener('open', function(e){\r\n onFirstLaunch();\r\n});\r\n\r\nfunction onFirstLaunch(){\r\n setTimeout(function() {\r\n updateSplitViewUI(Ti.Gesture.portrait, Ti.Gesture.landscape);\r\n }, 200);\r\n}\r\n/**\r\n * \r\n * @param {Bool} isPortrait\r\n * @param {Bool} isLandscape\r\n */\r\nfunction updateSplitViewUI(isPortrait, isLandscape){ //Ti.API.info(\"updateSplitView: (isPortrait:\" + isPortrait + \",isLandscape:\" + isLandscape + \")\");\r\n if (isLandscape) { //force show the Master Window in Landscape Mode\r\n masterNav.visible = true;\r\n } \r\n}\r\nTi.App.addEventListener('resumed', function(){\r\n Ti.API.info(\"App Resumed\");\r\n Ti.Gesture.fireEvent('orientationchange');\r\n});\r\n \r\nTi.App.addEventListener('paused', function(){\r\n Ti.API.info(\"App Paused\");\r\n});\r\n \r\nTi.Gesture.addEventListener('orientationchange',function(e) {\r\n updateSplitViewUI(e.source.portrait, e.source.landscape);\r\n});\r\n{code}", "updateAuthor": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-12-19T10:03:20.000+0000", "updated": "2018-12-19T10:03:20.000+0000" }, { "id": "444735", "author": { "name": "amwinsauto", "key": "amwinsauto", "displayName": "Adam Armstrong", "active": true, "timeZone": "America/Chicago" }, "body": "Issue #1 - I submitted a PR (attached to this ticket) that, from my testing, appears to provide masterIsOverlayed when in Landscape AND using SplitView with another App.\r\n\r\nIssue #2 - After more testing, it is not only the NavButtons that are not-clickable. When you hide the MasterView, anything on that \"section\" of the DetailView (that was initially covered by the MasterView when Overlayed) is completely unclickable.", "updateAuthor": { "name": "amwinsauto", "key": "amwinsauto", "displayName": "Adam Armstrong", "active": true, "timeZone": "America/Chicago" }, "created": "2018-12-19T12:51:46.000+0000", "updated": "2018-12-19T12:51:46.000+0000" }, { "id": "444770", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Issue #2 is due to [masterViewWrapper|https://github.com/appcelerator/titanium_mobile/blob/3c757bf8b913c1957f164b47dbccfa5ab8b3f39b/iphone/Classes/TiUIiOSSplitWindow.m#L58]. When we hide navigation window, masterViewWrapper is still there. Thats why that area is not clickable.\r\nIn my view we should introduce a new property \"masterViewVisible\" in TiUIiOSSplitWindow, which will ensure show and hide of masterView.\r\n[~amwinsauto] [~jquick] any thought?\r\nThanks!", "updateAuthor": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-12-20T10:02:57.000+0000", "updated": "2018-12-20T10:02:57.000+0000" }, { "id": "444778", "author": { "name": "amwinsauto", "key": "amwinsauto", "displayName": "Adam Armstrong", "active": true, "timeZone": "America/Chicago" }, "body": "Sounds like that should work.", "updateAuthor": { "name": "amwinsauto", "key": "amwinsauto", "displayName": "Adam Armstrong", "active": true, "timeZone": "America/Chicago" }, "created": "2018-12-20T13:12:00.000+0000", "updated": "2018-12-20T13:12:00.000+0000" }, { "id": "444823", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR (master) - https://github.com/appcelerator/titanium_mobile/pull/10559\r\nPR (8_0_X) - https://github.com/appcelerator/titanium_mobile/pull/10595", "updateAuthor": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-12-24T09:40:09.000+0000", "updated": "2019-01-09T14:56:45.000+0000" }, { "id": "445361", "author": { "name": "kmahalingam", "key": "kmahalingam", "displayName": "Keerthi Mahalingam", "active": false, "timeZone": "America/Los_Angeles" }, "body": "PR merged", "updateAuthor": { "name": "kmahalingam", "key": "kmahalingam", "displayName": "Keerthi Mahalingam", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2019-01-15T19:11:44.000+0000", "updated": "2019-01-15T19:11:44.000+0000" }, { "id": "445365", "author": { "name": "kmahalingam", "key": "kmahalingam", "displayName": "Keerthi Mahalingam", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix in SDK 8.0.0.v20190114160512 and 8.1.0.v20190115063333.'masterIsOverlayed' works as expected.\r\n{code}\r\nTest Environment:\r\n
Operating System
Name = Mac OS X
\r\nVersion = 10.13.6
\r\nArchitecture = 64bit
\r\nNode.js\r\n
Node.js \r\nVersion = 8.12.0\r\n
npm Version = 6.4.1
\r\nTitanium CLI\r\n
CLI Version = 5.1.1\r\n
STUDIO =5.1.2.201812191857\r\nDevice =iPad Pro 12.9 inch version 12\r\n{code}", "updateAuthor": { "name": "kmahalingam", "key": "kmahalingam", "displayName": "Keerthi Mahalingam", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2019-01-15T20:19:04.000+0000", "updated": "2019-01-15T20:19:04.000+0000" } ], "maxResults": 24, "total": 24, "startAt": 0 } } }