UITableView页脚,故事板和Xcode 6的Autolayout问题

时间:2015-02-16 23:09:27

标签: ios xcode uitableview autolayout xcode-storyboard

我正在尝试通过Storyboard向我的UITableView添加页脚视图,但是Autolayout继续绘制的页脚视图比我在Storyboard中调整视图的大小要大得多。这似乎是由页脚视图中包含的UIButton的Autolayout约束引起的,尽管没有约束的组合(我已尝试过几次)会导致页脚视图正确调整大小,即使我在页脚中正确地调整了UIButton的大小图。

问题的屏幕截图(页脚视图有白色背景):imgur link

我在这个特定实例中使用的约束(尽管请记住,我已尝试了几个,包括那些具有UIButton定义高度的约束 - 当我设置UIButton的高度时,UIButton正确绘制,但是页脚视图仍然是由于某种原因巨大):

constraints

思考?解决方案?在使用Storyboard之前,我已经使用了故事板的页脚视图,没有任何问题,但从未使用过大小类。

2 个答案:

答案 0 :(得分:2)

希望这会有所帮助:

gem install sass

答案 1 :(得分:0)

我有同样的问题。当你有一个导航栏时,它看起来像是一个Xcode的错误

我这样解决......

footerView = tableView.tableFooterView
    tableView.tableFooterView = nil
    tableView.addSubview(footerView)
    footerView.frame.size.height = 100
相关问题