V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
iOS 开发实用技术导航
NSHipster 中文版
http://nshipster.cn/
cocos2d 开源 2D 游戏引擎
http://www.cocos2d-iphone.org/
CocoaPods
http://cocoapods.org/
Google Analytics for Mobile 统计解决方案
http://code.google.com/mobile/analytics/
WWDC
https://developer.apple.com/wwdc/
Design Guides and Resources
https://developer.apple.com/design/
Transcripts of WWDC sessions
http://asciiwwdc.com
Cocoa with Love
http://cocoawithlove.com/
Cocoa Dev Central
http://cocoadevcentral.com/
NSHipster
http://nshipster.com/
Style Guides
Google Objective-C Style Guide
NYTimes Objective-C Style Guide
Useful Tools and Services
Charles Web Debugging Proxy
Smore
holonunu
V2EX  ›  iDev

使用 autoLayout 或 masonry 布局,在 Category 里,如何获取真实的 frame

  •  
  •   holonunu · Oct 8, 2018 · 4474 views
    This topic created in 2758 days ago, the information mentioned may be changed or developed.

    Constraints 会更新几次 frame,如何监听 frame 的变化?

    ai277014717
        1
    ai277014717  
       Oct 8, 2018
    layoutifneed 或许可以满足你的要求
    不行的话就 kvo
    rannie
        2
    rannie  
       Oct 8, 2018 via iPhone
    viewDidLayoutSubviews
    holonunu
        3
    holonunu  
    OP
       Oct 8, 2018
    @ai277014717
    @rannie
    使用 Method sizzling 替换 layoutSubviews 解决了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1283 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 40ms · UTC 17:30 · PVG 01:30 · LAX 10:30 · JFK 13:30
    ♥ Do have faith in what you're doing.