{ "id": "166886", "key": "AC-4889", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2017-04-04T14:08:28.000+0000", "created": "2017-03-31T13:05:01.000+0000", "labels": [ "backgroundColor", "window" ], "versions": [ { "id": "17038", "name": "Appcelerator Studio 4.5.0", "archived": false, "released": false } ], "issuelinks": [ { "id": "54666", "type": { "id": "10001", "name": "Cloners", "inward": "is cloned into", "outward": "is cloned from" }, "outwardIssue": { "id": "127407", "key": "TIMOB-16597", "fields": { "summary": "iOS: Can't create modal transparent Window", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "54665", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "136224", "key": "TIDOC-1868", "fields": { "summary": "iOS: Can't create modal transparent window", "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" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2017-04-04T14:08:28.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": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "Try code above, after animation Window color is reset to Titanium.UI.backgroundColor\r\n\r\n{code}\r\nvar win = Titanium.UI.createWindow({\r\n backgroundColor: 'white',\r\n});\r\nwin.open();\r\nvar fail = Ti.UI.createWindow({\r\n\tmodal:true,\r\n\tbackgroundColor:'transparent'//or #00FFFFFF\r\n});\r\nfail.add(Ti.UI.createLabel({\r\n\ttext:\"Test\"\r\n}));\r\nfail.open();//after animation background is black (default)\r\n{code}", "attachment": [ { "id": "61945", "filename": "Testingmodal.zip", "author": { "name": "c3k", "key": "c3k", "displayName": "carlo", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-03-31T13:05:02.000+0000", "size": 34558, "mimeType": "application/zip" } ], "flagged": false, "summary": "iOS: Can't create modal transparent Window", "creator": { "name": "c3k", "key": "c3k", "displayName": "carlo", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "c3k", "key": "c3k", "displayName": "carlo", "active": true, "timeZone": "Europe/Berlin" }, "environment": "Mac OSX, Titanium SDK 3.2.1", "comment": { "comments": [ { "id": "416452", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Moving this ticket to engineering as I can reproduce the issue with the provided test case.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-03-10T06:12:59.000+0000", "updated": "2014-03-10T06:12:59.000+0000" }, { "id": "416453", "author": { "name": "giorgos29cm", "key": "giorgos29cm", "displayName": "Giorgos Papadopoulos", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I think we have to setup the parent view controller modal presentation style to use the same view presentation style.\r\n\r\nAdd this:\r\ntopVC.modalPresentationStyle = UIModalPresentationCurrentContext;\r\n\r\nbefore presenting the view controller on -(void)showControllerModal:(UIViewController*)theController animated:(BOOL)animated of TiRootViewController.m\r\n\r\nTested it and works with TiSDK 3.2.1, on simulator 7.0.3.", "updateAuthor": { "name": "giorgos29cm", "key": "giorgos29cm", "displayName": "Giorgos Papadopoulos", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-03-15T15:23:49.000+0000", "updated": "2014-03-15T15:23:49.000+0000" }, { "id": "416454", "author": { "name": "colorhat", "key": "colorhat", "displayName": "Tobias Høegh", "active": true, "timeZone": "Europe/Oslo" }, "body": "It has nothing to do with the animation of the modal window. Same effect with animated set to false:\r\n\r\nfail.open({animated:false});\r\n\r\nBut sure. Looks like the solution is fine.", "updateAuthor": { "name": "colorhat", "key": "colorhat", "displayName": "Tobias Høegh", "active": true, "timeZone": "Europe/Oslo" }, "created": "2014-04-29T07:24:35.000+0000", "updated": "2014-04-29T07:24:35.000+0000" }, { "id": "416455", "author": { "name": "tgo", "key": "tgo", "displayName": "Thierry Godfroid", "active": true, "timeZone": "Europe/Berlin" }, "body": "FWIW, I did change it in 3.1.3GA and we get a transparent bg but it breaks the opening animation (slide up). Any clue ? thanks\r\n\r\n3.1.3GA test on simulator 6.1", "updateAuthor": { "name": "tgo", "key": "tgo", "displayName": "Thierry Godfroid", "active": true, "timeZone": "Europe/Berlin" }, "created": "2014-05-16T08:34:08.000+0000", "updated": "2014-05-16T08:34:08.000+0000" }, { "id": "416456", "author": { "name": "giorgos29cm", "key": "giorgos29cm", "displayName": "Giorgos Papadopoulos", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Could you provider a test case ? Then I will look it up.", "updateAuthor": { "name": "giorgos29cm", "key": "giorgos29cm", "displayName": "Giorgos Papadopoulos", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-05-17T09:34:04.000+0000", "updated": "2014-05-17T09:34:04.000+0000" }, { "id": "416457", "author": { "name": "tgo", "key": "tgo", "displayName": "Thierry Godfroid", "active": true, "timeZone": "Europe/Berlin" }, "body": "Here you go. With the code below, and without adding the line you mention (with UIModalPresentationCurrentContext), animation is ok, transparency is maintained during animation and it all goes black (as expected) at end of animation.\r\n\r\nNow, modify TiRootViewController with your line and recompile/run the app. When you click the red background, the modal just pops up without tthe slideup animation (but the end result shows the transparency).\r\n\r\nHTH\r\nThierry\r\n\r\n{code:javascript}\r\nvar navwin, modalnavwin, rootwin, rootmodalwin;\r\nrootmodalwin = Ti.UI.createWindow({\r\n\tbackgroundColor: '#7F00CCCC'\r\n});\r\nmodalnavwin = Ti.UI.iOS.createNavigationWindow({\r\n\tmodal: true,\r\n\twindow: rootmodalwin\r\n});\r\nrootmodalwin.addEventListener('click',function(){ 'use strict';\r\n\tmodalnavwin.close();\r\n});\r\nrootwin = Ti.UI.createWindow({\r\n\tbackgroundColor: 'red'\r\n});\r\nrootwin.add( Ti.UI.createImageView({\r\n\twidth: 300,\r\n\theight: 200,\r\n\timage: 'http://www.appcelerator.com/wp-content/uploads/film_reel@2x.png'\r\n}));\r\nnavwin = Ti.UI.iOS.createNavigationWindow({\r\n\twindow: rootwin\r\n});\r\nrootwin.addEventListener('click', function(){ 'use strict';\r\n\tmodalnavwin.open();\r\n});\r\nnavwin.open()\r\n{code}\r\n\r\nedited: I made a mistake in the previous version, it is of course navwin.open() at the last line not rootwin.open() !", "updateAuthor": { "name": "tgo", "key": "tgo", "displayName": "Thierry Godfroid", "active": true, "timeZone": "Europe/Berlin" }, "created": "2014-05-17T14:02:01.000+0000", "updated": "2014-05-17T14:02:01.000+0000" }, { "id": "416458", "author": { "name": "tgo", "key": "tgo", "displayName": "Thierry Godfroid", "active": true, "timeZone": "Europe/Berlin" }, "body": "please be aware that with SDK 3.2.2 and SDK 3.2.3 (at least) adding the line to TiRootViewController.m *breaks* the modal slide up animation !! So, the full solution is bound to be more complicated, I am afraid.", "updateAuthor": { "name": "tgo", "key": "tgo", "displayName": "Thierry Godfroid", "active": true, "timeZone": "Europe/Berlin" }, "created": "2014-05-25T19:41:30.000+0000", "updated": "2014-05-25T19:41:30.000+0000" }, { "id": "416459", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~srahim] to mark as invalid.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-06-02T21:43:39.000+0000", "updated": "2014-06-02T21:43:39.000+0000" }, { "id": "416460", "author": { "name": "tgo", "key": "tgo", "displayName": "Thierry Godfroid", "active": true, "timeZone": "Europe/Berlin" }, "body": "I find this a bit harsh. There are apps out there who manage to do that natively (Path, for instance). \r\nI have tried with transparency of the root window and failed. So could you show me how to adapt the sample I gave for reproduction so that it work with the setBackgroundColor() trick you mention ?\r\n\r\nThanks", "updateAuthor": { "name": "tgo", "key": "tgo", "displayName": "Thierry Godfroid", "active": true, "timeZone": "Europe/Berlin" }, "created": "2014-06-25T06:28:26.000+0000", "updated": "2014-06-25T06:28:26.000+0000" }, { "id": "416462", "author": { "name": "tgo", "key": "tgo", "displayName": "Thierry Godfroid", "active": true, "timeZone": "Europe/Berlin" }, "body": "I tested with this and added the setBackgroundColor() to my own test app (see post of 17-may).\r\nI agree that it changes the background color. \r\nBut it still does not show the underlying root window under the tranparent modal.\r\nHow do you propose to do that with only a color change ? It seems to me that the root cause is that the rootwindow is removed from the display and that's what solved with the trick shown by Giorgios.", "updateAuthor": { "name": "tgo", "key": "tgo", "displayName": "Thierry Godfroid", "active": true, "timeZone": "Europe/Berlin" }, "created": "2014-06-30T07:44:33.000+0000", "updated": "2014-06-30T07:44:33.000+0000" }, { "id": "416463", "author": { "name": "c3k", "key": "c3k", "displayName": "carlo", "active": true, "timeZone": "Europe/Berlin" }, "body": "give root window the same background color of modal window is not a solution for me!\r\n\r\nI think you have to consider this issue still open", "updateAuthor": { "name": "c3k", "key": "c3k", "displayName": "carlo", "active": true, "timeZone": "Europe/Berlin" }, "created": "2014-09-02T12:05:08.000+0000", "updated": "2014-09-02T12:05:08.000+0000" }, { "id": "416466", "author": { "name": "c3k", "key": "c3k", "displayName": "carlo", "active": true, "timeZone": "Europe/Berlin" }, "body": "I change my code so I don't need modal parameter anymore, thanks for code snippets.\r\n\r\n\r\nFinally, we can't create *modal* transparent window.\r\nI think this should be reported in docs.", "updateAuthor": { "name": "c3k", "key": "c3k", "displayName": "carlo", "active": true, "timeZone": "Europe/Berlin" }, "created": "2014-09-08T16:10:19.000+0000", "updated": "2014-09-08T16:10:19.000+0000" }, { "id": "416467", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~bhatfield] FYI.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-09-08T17:32:48.000+0000", "updated": "2014-09-08T17:32:48.000+0000" }, { "id": "416468", "author": { "name": "colorhat", "key": "colorhat", "displayName": "Tobias Høegh", "active": true, "timeZone": "Europe/Oslo" }, "body": "As Vishal Duggal mentioned: Transparent modal windows are little difficult to do.\r\nSame info in the link below, but there is also a workaround/example code. So it's absolute possible.\r\n\r\nhttp://www.cocoaosx.com/2011/10/20/how-to-display-transparent-modal-viewcontrollers/\r\n", "updateAuthor": { "name": "colorhat", "key": "colorhat", "displayName": "Tobias Høegh", "active": true, "timeZone": "Europe/Oslo" }, "created": "2014-09-08T18:09:58.000+0000", "updated": "2014-09-08T18:09:58.000+0000" }, { "id": "416469", "author": { "name": "tgo", "key": "tgo", "displayName": "Thierry Godfroid", "active": true, "timeZone": "Europe/Berlin" }, "body": "I kind of agree with @Tobias Schibler. I know we can work around the issue but the goal of the titanium framework (at least to me) is that we can have the same behavior without resorting to per OS work arounds .... ", "updateAuthor": { "name": "tgo", "key": "tgo", "displayName": "Thierry Godfroid", "active": true, "timeZone": "Europe/Berlin" }, "created": "2014-09-08T19:32:33.000+0000", "updated": "2014-09-08T19:32:33.000+0000" }, { "id": "416470", "author": { "name": "colorhat", "key": "colorhat", "displayName": "Tobias Høegh", "active": true, "timeZone": "Europe/Oslo" }, "body": "[~vduggal] You make a good work! Thanks a lot.\r\nWould be good to have this facts with transparent modal windows in the docs.", "updateAuthor": { "name": "colorhat", "key": "colorhat", "displayName": "Tobias Høegh", "active": true, "timeZone": "Europe/Oslo" }, "created": "2014-09-09T07:02:56.000+0000", "updated": "2014-09-09T07:02:56.000+0000" }, { "id": "416471", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as \"Won't Fix\". There has been no update for a while. If there is any problem, please open a new ticket.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-30T20:52:35.000+0000", "updated": "2017-03-30T20:52:35.000+0000" }, { "id": "416472", "author": { "name": "c3k", "key": "c3k", "displayName": "carlo", "active": true, "timeZone": "Europe/Berlin" }, "body": "Same behavior in 6.0.3", "updateAuthor": { "name": "c3k", "key": "c3k", "displayName": "carlo", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-03-31T13:06:32.000+0000", "updated": "2017-03-31T13:06:32.000+0000" } ], "maxResults": 22, "total": 22, "startAt": 0 } } }