Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-15832] iOS: View centered in window quickly shifts about 10dp down

GitHub Issuen/a
TypeBug
PriorityLow
StatusReopened
ResolutionUnresolved
Affected Version/sRelease 3.1.3
Fix Version/sn/a
ComponentsiOS
LabelsSupportTeam
ReporterFokke Zandbergen
AssigneeUnknown
Created2013-09-13T09:54:38.000+0000
Updated2018-02-28T20:04:25.000+0000

Description

If you have a view centered in a window about 1 out of 2 or 3 times the window is opened, you notice the view quickly shifting down about 10dp.

Steps to reproduce

Create a new app: titanium create -p ios -n testShift --id test.shift -d .

As app.js use:

    function openWin() {
        var w = Ti.UI.createWindow({backgroundColor:'red'});
        var v = Ti.UI.createView({width:300,height:200,backgroundColor:'blue'});
        v.addEventListener('click', openWin);
        w.add(v);
        w.open();
    }
    openWin();
    

Run the app on a device: titanium build -p ios -T device

Repeatedly click the blue view to keep opening the same window again

Pay close attention to the blue view and notice it quickly shifting about 10dp down every now and then after opening a new window.

Notes

* Explicitly center v using center:{x:'50%',y:'50%'} won't help. * Setting an absolute top on v fixes it, but that's not what we want. * This **only** happens in device testing

Comments

  1. Mostafizur Rahman 2013-09-20

    Hello, I run your test code and try to reproduce this bug. But I can't reproduce this. My testing environment follows: - iOS 7 GM, Mac OS X 10.8.4 CLI 3.1.2 GA. Thanks
  2. Fokke Zandbergen 2013-09-20

    Hello [~mrahman], Did you test it on a device? It doesn't reproduce in the simulator.
  3. Fokke Zandbergen 2013-11-26

    [~mpmiranda] don't close this ticket please! [~mrahman] likely did not try this on a device and that's where it occurs!

JSON Source