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
yfmir
V2EX  ›  iDev

请教 iOS7 下莫名的 cpu 占用

  •  
  •   yfmir · Jul 10, 2015 · 3598 views
    This topic created in 3954 days ago, the information mentioned may be changed or developed.
    在iOS8下没问题,但是在ios7下某几个页面出现莫名的卡死,CPU占用99%,用工具查了下,发现大部分卡的都是一些与scrollview、autolayout有关的函数,ui用到scrollview内嵌tableview,用storyboard和masonry结合写的约束,有人遇到类似问题的吗?

    Supplement 1  ·  Jul 10, 2015
    换成普通代码布局之后就正常了,估计是scrollview用autolayout计算contentsize的某些函数占用的时间
    4 replies    2015-07-10 16:08:59 +08:00
    engin
        1
    engin  
       Jul 10, 2015
    给张高清图哈。
    yfmir
        2
    yfmir  
    OP
       Jul 10, 2015
    yfmir
        3
    yfmir  
    OP
       Jul 10, 2015
    @engin 不太会发图~
    110293734
        4
    110293734  
       Jul 10, 2015
    autolayout在 IOS 8.x之前,有一些bug的。。。

    比如IOS 8.0

    还有,你的图,看不清。这种autolayout问题,建议用 View debug 来进行处理。或者reveal
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3267 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 14:02 · PVG 22:02 · LAX 07:02 · JFK 10:02
    ♥ Do have faith in what you're doing.