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

我用 storyboard 怎么设置一个 view 的高度是 0.5,好像最小单位是 1。

  •  1
     
  •   cheng4741 ·
    zhubinchen · 2015-09-28 11:10:35 +08:00 · 3397 次点击
    这是一个创建于 3105 天前的主题,其中的信息可能已经有所发展或是发生改变。
    11 条回复    2015-10-02 16:24:47 +08:00
    pedestrianc
        1
    pedestrianc  
       2015-09-28 11:13:12 +08:00
    可以在高度栏输入 0.5
    pedestrianc
        2
    pedestrianc  
       2015-09-28 11:14:37 +08:00
    刚试了下,不行了。。。
    botasky
        3
    botasky  
       2015-09-28 12:24:09 +08:00 via Android
    .5 ?
    HappyHacking
        4
    HappyHacking  
       2015-09-28 12:54:00 +08:00
    好像要在代码里面设置吧。 SB 里面好像是可以用 Runtime 来实现。。。
    Shane
        5
    Shane  
       2015-09-28 14:29:02 +08:00
    AutoLayout 加一个 0.5 的约束
    black
        6
    black  
       2015-09-28 14:39:55 +08:00
    可以用文本模式打开 storyboard 文件,修改对应的 XML 值,但是下次再用 InterfaceBuilder 打开还是会被自动改回去,所以,除了代码设置,并没有其他什么好办法。。。
    railgun
        7
    railgun  
       2015-09-28 14:56:57 +08:00
    告诉你个坑,跑完动画之后, frame 都会四舍五入取整。
    yfmir
        8
    yfmir  
       2015-09-28 16:32:39 +08:00
    我都是 IBOutlet 到代码然后手动改的~
    zhigang1992
        9
    zhigang1992  
       2015-09-28 20:40:22 +08:00 via Android
    Autolayout constraint + Key Value 设置 constant 为 0.5
    kobe1941
        10
    kobe1941  
       2015-09-29 09:56:50 +08:00
    使用 autolayout ,然后在代码里改变值即可
    Ixizi
        11
    Ixizi  
       2015-10-02 16:24:47 +08:00
    Key Value +1
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5306 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 09:07 · PVG 17:07 · LAX 02:07 · JFK 05:07
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.