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

遇到适配 iOS7.1 屏幕的诡异问题

  •  
  •   cxq · 2015-09-23 23:36:37 +08:00 · 2200 次点击
    这是一个创建于 3145 天前的主题,其中的信息可能已经有所发展或是发生改变。


    现在 UITabBarViewController 的 edgesForExtendedLayout 是去掉了 Under Top Bars 的
    但是第一个 View 被向下移动了 20 个 point, self.view 的高度虽然是正常的,但是 subview 都是从 origin.y+20 开始计算。
    。去到其他界面回来又好了。

    使用 KVO 监控这个 Viewcontroller 的 frame 的改动, 发现造成这个错误的 frame 是由于 auto resize subview , autoresize 在 iOS7 上就会出现自动加 20point 的问题。


    另外去掉 statusbar 以后也没有这个问题。
    2 条回复    2015-09-24 09:12:19 +08:00
    heqichang
        1
    heqichang  
       2015-09-24 08:26:01 +08:00   ❤️ 1
    你用 autolayout 布局顶部相对于的是 toplayoutguide 的吧?取消掉 adjust scroll view insets 的试试?
    cxq
        2
    cxq  
    OP
       2015-09-24 09:12:19 +08:00
    @heqichang 试过了 不可以 不过还是 谢谢
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2100 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 15:57 · PVG 23:57 · LAX 08:57 · JFK 11:57
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.