Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我对此没有太多经验,但我想将两个 UIButtons 放置在一个矩形内,如下图所示。那么最好的方法是什么?我不想从 Photoshop 中绘制矩形图像并导入 xCode。谢谢
您可以将 UIView 拖到 Storyboard 上,然后将按钮拖到上面,因此它们是子视图。故事板看起来像:
view controller -view (main) -view (your new subview) -button1 -button2
然后您可以在子视图上设置背景等以直观地定义矩形