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

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

  •  1
     
  •   cheng4741 ·
    zhubinchen · Sep 28, 2015 · 4486 views
    This topic created in 3869 days ago, the information mentioned may be changed or developed.
    11 replies    2015-10-02 16:24:47 +08:00
    pedestrianc
        1
    pedestrianc  
       Sep 28, 2015
    可以在高度栏输入 0.5
    pedestrianc
        2
    pedestrianc  
       Sep 28, 2015
    刚试了下,不行了。。。
    botasky
        3
    botasky  
       Sep 28, 2015 via Android
    .5 ?
    HappyHacking
        4
    HappyHacking  
       Sep 28, 2015
    好像要在代码里面设置吧。 SB 里面好像是可以用 Runtime 来实现。。。
    Shane
        5
    Shane  
       Sep 28, 2015
    AutoLayout 加一个 0.5 的约束
    black
        6
    black  
       Sep 28, 2015
    可以用文本模式打开 storyboard 文件,修改对应的 XML 值,但是下次再用 InterfaceBuilder 打开还是会被自动改回去,所以,除了代码设置,并没有其他什么好办法。。。
    railgun
        7
    railgun  
       Sep 28, 2015
    告诉你个坑,跑完动画之后, frame 都会四舍五入取整。
    yfmir
        8
    yfmir  
       Sep 28, 2015
    我都是 IBOutlet 到代码然后手动改的~
    zhigang1992
        9
    zhigang1992  
       Sep 28, 2015 via Android
    Autolayout constraint + Key Value 设置 constant 为 0.5
    kobe1941
        10
    kobe1941  
       Sep 29, 2015
    使用 autolayout ,然后在代码里改变值即可
    Ixizi
        11
    Ixizi  
       Oct 2, 2015
    Key Value +1
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   902 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 49ms · UTC 23:23 · PVG 07:23 · LAX 16:23 · JFK 19:23
    ♥ Do have faith in what you're doing.