Home  >  Q&A  >  body text

uikit - 现在写ios的UI用storyboard多么

这两天刚开始接触ios,看的两套教程里面用的都是storyboard拖拽控件进行的布局。我之前是学前端的,布局基本上都是码代码的。所以现在我想问下,ios里布局是用storyboard比较多还是有其他方式(比如像css一样码代码的)?其他方式还有哪些呢?有什么好的ios的UI教程可以推荐一下?谢谢啦~

阿神阿神2765 days ago500

reply all(8)I'll reply

  • 迷茫

    迷茫2017-04-17 15:30:41

    This is a technical blog written by an expert. You can refer to it.
    Link description
    In addition to storyboard, you can also use xib in a mixed manner, using xib only on individual simple pages. Complex pages can be written in code.
    If you don't use xib or storyboard, you can only use pure code. The main reason is that Apple has more screens now, and xib is easier to adapt to.
    But it doesn't matter. If you use code, it doesn't matter if you use relative layout. The relative layout of the system is too unfriendly. It is recommended to use masonry. A third party that specifically encapsulates the relative layout of the system is very convenient to use.
    As for UI tutorials, if you search online, there should be a lot of text and video tutorials, and there are so many training institutions now. There will be no shortage of tutorials.

    reply
    0
  • 怪我咯

    怪我咯2017-04-17 15:30:41

    It depends on the needs. Handwritten code should be commented, the code hierarchy should be standardized, and it is easy to maintain

    reply
    0
  • 伊谢尔伦

    伊谢尔伦2017-04-17 15:30:41

    怎样做起来简单高效,就选哪样,不是哪样就绝对的好,不过我们这开发是代码加xib
    

    reply
    0
  • 高洛峰

    高洛峰2017-04-17 15:30:41

    I used to use xib+code, now I use pure code, sb means I have never used it and I don’t know how to use it. Pure code will be slower at the beginning, but it will be easier to maintain in the future, and it will be a good exercise to improve your ability to reuse code.

    reply
    0
  • 阿神

    阿神2017-04-17 15:30:41

    Personally, I think mixing sb and code will improve the efficiency of development. After all, this kind of issue is a matter of opinion.

    reply
    0
  • 怪我咯

    怪我咯2017-04-17 15:30:41

    I used to write in code, but after I came into contact with sb and xib, I found the layout very convenient. Drag the control up and you can intuitively see the interface to be developed. It is easy to modify and add constraints. Now is the code, sb, xib are used together.

    reply
    0
  • PHP中文网

    PHP中文网2017-04-17 15:30:41

    Storyboard is the mainstream. On the one hand, the layout is convenient and the hierarchical structure is clear; on the other hand, it facilitates the subsequent development of the project

    reply
    0
  • 巴扎黑

    巴扎黑2017-04-17 15:30:41

    Only the startup image uses xib, all projects use the interface written in code

    reply
    0
  • Cancelreply