Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-10005] iOS: "postlayout" event doesn't work as it should

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-12-21T05:26:41.000+0000
Affected Version/sRelease 3.0.0
Fix Version/sSprint 2012-15 Core, Release 3.0.0
ComponentsiOS
Labelscore, layout, module_window, qe-review, qe-testadded
ReporterIvan Skugor
AssigneeNeeraj Gupta
Created2012-07-04T00:13:59.000+0000
Updated2013-12-02T09:14:53.000+0000

Description

Comments

  1. Ivan Skugor 2012-07-17

    Note that this is not iOS only issue. Android also has issue with "postlayout" event, but it is different (maybe another ticket should be filed for that).
  2. Ivan Skugor 2012-07-18

    Sorry, I missed to notice that other "Android" ticket. It is incomplete, as you can see in this ticket, "postlayout" event is not fired for TiButton and TiLabel.
  3. Stephen Tramer 2012-07-24

    We cannot fire only a single "postlayout" event in all situations because the multiple layout passes are required and we cannot determine which one is the final event without looking into the future. Instead the number of postlayout events can be reduced, so they are only fired when the view's size actually changes.
  4. Ivan Skugor 2012-07-25

    It would be nice if situations when events are fired multiple times are documented. Thanks.
  5. Vishal Duggal 2012-07-25

    PR https://github.com/appcelerator/titanium_mobile/pull/2632 merged against master. As noted in the comments the postLayout event is only fired if either the size or position of the view changes. Also the event no longer propagates to the parent.
  6. Olga Romero 2012-08-14

    Verified fix with: Titanium Studio, build: 2.1.1.201207271312 Titanium SDK: 2.2.0.v20120813184911 Devices: iPhone 4s 5.0.1 iPad1 5.1.1 Simulator 5.1
  7. Anshu Mittal 2012-09-04

    Reopening to update labels

JSON Source