V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
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 · 2015-07-10 12:23:58 +08:00 · 2522 次点击
    这是一个创建于 3219 天前的主题,其中的信息可能已经有所发展或是发生改变。
    在iOS8下没问题,但是在ios7下某几个页面出现莫名的卡死,CPU占用99%,用工具查了下,发现大部分卡的都是一些与scrollview、autolayout有关的函数,ui用到scrollview内嵌tableview,用storyboard和masonry结合写的约束,有人遇到类似问题的吗?

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

    比如IOS 8.0

    还有,你的图,看不清。这种autolayout问题,建议用 View debug 来进行处理。或者reveal
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2289 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 44ms · UTC 06:18 · PVG 14:18 · LAX 23:18 · JFK 02:18
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.