Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-18636] iOS: Rotate documentViewer and back to root Window occurs a glitch on screen

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionCannot Reproduce
Resolution Date2016-11-17T23:40:16.000+0000
Affected Version/sRelease 3.5.0
Fix Version/sn/a
ComponentsiOS
LabelsTCSupportTriage, documentViewer, iOS, rotation
ReporterVictor Casé
AssigneeEric Merriman
Created2015-01-23T21:46:09.000+0000
Updated2017-03-23T21:09:46.000+0000

Description

[Edited] Steps to reproduce: 1.Create Window 2.Create a TabGroup 3.Create a TableView or ListView 2.Add a click listener 3.Call createDocumentViewer(): 4.Rotate the simulator/device to landscape 5.Back to root Win 6.Bug occurs

Attachments

FileDateSize
newtestDocumentViewer.zip2015-01-28T05:34:28.000+000010243331
testDocumentViewer.zip2015-01-26T04:50:20.000+000010241608
tibug1.png2015-01-23T21:46:09.000+000023690
tibug2.png2015-01-23T21:46:09.000+000022160
tibug3.png2015-01-23T21:46:09.000+000029475
titanium_glitch.mov2015-01-28T05:38:05.000+00002109643
titanium_window.mov2015-01-26T04:50:20.000+00002135504

Comments

  1. Victor Casé 2015-01-23

    Titanium.UI.setBackgroundColor('#000'); var win1 = Titanium.UI.createWindow({ title:'Tab 1', backgroundColor:'#fff' }); var label2 = Titanium.UI.createLabel({ color:'#999', text:'I am Window 2', font:{fontSize:20,fontFamily:'Helvetica Neue'}, textAlign:'center', width:'auto' }); label2.addEventListener('click',function(){ Ti.UI.iOS.createDocumentViewer({url:'test.png'}).show(); }); win1.add(label2); win1.open();
  2. Shuo Liang 2015-01-26

    Hi, I tried your code and steps mentioned in case on IOS 8.1 simulator, but can't reproduce your problem. Regards, Shuo
  3. Victor Casé 2015-01-26

    Hello Shuo, Sorry, I wrong the IOS version, my test case was on 8.1; I will attached my complete test code, plus a demo video. Hope that it helps you find the bug. Keep in touch.
  4. Shuo Liang 2015-01-28

    HI The problem is because the tiapp.xml file has a default setting for IOS orientation, Default iPhone setting is only "UIInterfaceOrientationPortrait", If you want your iPhone app can rotate to other orientation, you have to change ios setting part like this:
       <ios>
               <plist>
                   <dict>
                       <key>UISupportedInterfaceOrientations~iphone</key>
                       <array>
                           <string>UIInterfaceOrientationPortrait</string>
                           <string>UIInterfaceOrientationPortraitUpsideDown</string>
                           <string>UIInterfaceOrientationLandscapeLeft</string>
                           <string>UIInterfaceOrientationLandscapeRight</string>
                       </array>
                       <key>UISupportedInterfaceOrientations~ipad</key>
                       <array>
                           <string>UIInterfaceOrientationPortrait</string>
                           <string>UIInterfaceOrientationPortraitUpsideDown</string>
                           <string>UIInterfaceOrientationLandscapeLeft</string>
                           <string>UIInterfaceOrientationLandscapeRight</string>
                       </array>
       
    Here is the Ref to read about above change: [plist](http://docs.appcelerator.com/platform/latest/#!/guide/tiapp.xml_and_timodule.xml_Reference-section-29004921_tiapp.xmlandtimodule.xmlReference-plist) Remember to clean the app after change the tiapp.xml file, otherwise change will not apply to building process. Regards, Shuo
  5. Victor Casé 2015-01-28

    Shuo, your answer solves the test case, however, when I tried in my "real" app the bug occured yet. Then, I tried to discover the bug creating a new test case, a little bit more complex, and the bug occurs again. In fact, the new test case is a ( tabgroup -> tableview or listView -> documentViewer ). The rotation provokes the glitch again I will upload the new test code and a new test video. Hope to keep in touch.
  6. Victor Casé 2015-02-25

    Any update about it?
  7. Nils 2015-03-04

    Same for me. Would be fantastic to be able to lock rotation on documentViewer.
  8. Sebastian Klaus 2015-03-18

    Same here. My iPhone app is limited to portrait mode and the documentviewer can rotate. After closing the viewer, I'm getting the same glitch and only a forced restart of the app helps.
  9. Stefan Kemper 2015-07-02

    Same problem for me. My App is limited to landscape as orientation mode. As a workaround, I do not restrict any orientation while displaying an alternative window with an accordingly message for portrait (=forbidden) mode. Not my preferred but for the moment the only solution I figured out for this bug. "Ti.Gesture.addEventListener('orientationchange', function() { ... })" is a global event that captures orientation changes.
  10. Shawn Lan 2015-07-31

    Same problem here. My app is limited to portrait mode only. Rotating other modal windows such as video player or a window (modal=true) doesn't have such issue. Only document viewer is problematic. Please fix.
  11. Sebastian Klaus 2015-08-01

    The issue was reported January and nothing happened since now. Why are so serious problems ignored?
  12. Shawn Lan 2015-08-11

    Looks like if you open document viewer on top of a modal window, the issue is not there.
  13. Steve Rogers 2015-08-20

    SDK: 4.1.0.GA Device iPhone (Portrait only) Also an issue for me for an app being built for a client. Do we have any timeframe on a fix for this issue, or a temp workaround ? update: Have a workaround for now - as Shawn Lan suggested, I just open a blank Modal window full screen and use that to open the document viewer. When the document viewer unload event triggers I then close the modal window.
  14. Sebastian Klaus 2015-08-27

    Steve, that does the trick. Thanks for the hint. So I don't have to wait more time for the solution
  15. Shawn Lan 2015-08-27

    Are you able to create a modal transparent window?
  16. Shawn Lan 2016-09-23

    Is this issue fixed? I tested it again and didn't see this issue anymore.
  17. Hans Knöchel 2016-10-02

    Just saw this ticket. Is this still valid in newer SDK's? A simple app.js contanining the issue would be cool, thanks!
  18. Hans Knöchel 2016-11-17

    Cannot reproduce on recent versions of the SDK anymore. Test-case:
        var win = Ti.UI.createWindow({
            backgroundColor: "#fff",
            title: "My Window"
        });
        
        var btn = Ti.UI.createButton({
            title: "Open Document Viewer"
        });
        
        btn.addEventListener("click", function() {
            Ti.UI.iOS.createDocumentViewer({url:'default_app_logo.png'}).show();
        });
        
        win.add(btn);
        
        var nav = Ti.UI.iOS.createNavigationWindow({
            window:win
        });
        
        nav.open();
        
  19. Lee Morris 2017-03-23

    Can verify this ticket as "Cannot Reproduce". Tested with the following environment; iPhone 7 (10.2) MacOS 10.11.6 (15G31) Studio 4.8.1.201612050850 Ti SDK 6.0.3 GA Appc NPM 4.2.8 Appc CLI 6.1.0 Ti CLI 5.0.11 Alloy 1.9.5 Arrow 1.10.1 Xcode 8.2 (8C38) Node v4.6.0 Java 1.7.0_80

JSON Source