TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

An open source library for laying out iOS user interfaces.

66 点作者 charlesmchen大约 13 年前

4 条评论

nodemaker大约 13 年前
I think this way of laying out subviews is a functionally incomplete approach and it more often than not makes you write more code than it really abstracts.<p>To be honest this is in fact one reason most iOS developers dont like Android or Java Swing.Because what really happens is that you think of something really cool and then you realize that its not really linear or grid or rectangular or even box.At that point learning how to layout subviews with co-ordinates is too much work and you just go with a shitty box layout instead.This has happened to me so many times while using java swing that I am now (wrongly) biased against java for life.<p>For example what if I want to layout my subviews in a circular fashion around the centre of the parent view.Or what if my subviews are cards which are seperated from the previous card with exponentially increasing distances.<p>On iOS the simple way to layout subviews is by quite simply setting their frames relative to the frame of the parent view in the layoutSubviews method.To take care of different screen sizes and orientations all you have to do is the set the autoresizing mask correctly.Thats it!<p>That's like seven lines of code for three subviews and it is functionally complete.
blueprint大约 13 年前
This is a neat concept, but like nodemaker I have to point out that it has some limitations in terms of what sort of interfaces it can make.<p>Additionally, in order to make use of this tool, you still need to be a programmer, and if you are a designer or someone who has ideas and no programming knowledge, you cannot use it. This is one major reason I launched my company, Blueprint - <a href="https://blueprint.io" rel="nofollow">https://blueprint.io</a> - not only can you lay out your highly customized app visually like this (except, by pixel, if you'd like) but it actually handles the entire build process for you and lets you download and submit it to the store.<p>Thanks for sharing! Hope to see this tool develop in the future. If I could add one request it would be to have some way to iteratively or procedurally lay out views.
RandallBrown大约 13 年前
Interesting. Some of the grid views seem like they could be really useful, as does the automatic orientation stuff.<p>It seems like this should play nicely with interface builder still also. I couldn't give up IBActions and IBOutlets.<p>An interesting next step would be take take your sample project and make it into it's own sort of Interface Builder that would generate the objective-c to programmatically build those views. That would be pretty cool.
评论 #3638826 未加载
hobonumber1大约 13 年前
I was very impressed by the demo. The comments below re. integration with Interface Builder is justified but its still impressive. Thanks for open sourcing this!