Skip to content

Comment on Laying Out iOS UIs in Code

Comments

    I use UIView+Positioning, which exposes x, y, width,    
    height, right, bottom, centerX, and centerY as both 
    setters and getters.
IB/code aside, this is convenient. All of those properties are read-only by default, and that's always seemed counterintuitive to me (though I'm sure there's some purpose I'm missing).

Those are struct members, not properties.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.