WeView 2

An alternative to iOS Auto Layout

Design Philosophy

Tracy: “We sailed it down the coast of Maine and back the Summer we were married. My, she was yar…”

George: “Yar? What does that mean?”

Tracy: “It means… easy to handle, quick to the helm, fast, right. Everything a boat should be, until she develops dry rot.”

From “The Philadelphia Story” by Philip Barry

Creating a UI auto-layout tool doesn’t require much code. There isn’t any algorithmic complexity; performance isn’t a concern. The difficulty lies in coming up with an design that is easy to learn and use. It should yield code that is easy to write and maintain. It is an API design challenge.

It is awkward to express layout using code no matter whether you use an auto-layout tool like iOS Auto Layout or WeView 2 or just work programmatically. Layout code quickly grows into an unmanageable mound of repetitious spaghetti code. In the interest of maintainability, WeView 2 is tightly focused on the goal of yielding concise, expressive code.

To this end, WeView 2 takes a number of unusual measures.

Design Goals

And lastly: Use a Documentation-Driven Design process:

API Design References