-
Notifications
You must be signed in to change notification settings - Fork 2
Prototype Storyboards
Pablo Villar edited this page Sep 27, 2016
·
2 revisions
Prototype your storyboards (and .xib files) as much as possible.
Here are some advices:
- Avoid having UI elements with empty values; rather have them set with example values.
- Prefer real examples instead of generic ones:
-
John Appleseedreads way better thanUser Name, since the former is closer to a real use case. -
[email protected], rather thanEmail Address.
-
- When it comes to numeric values, try to choose values that are not extreme cases:
- Favorites:
3 people, rather than0 people. - Progress bar:
45% completedrather than0% completedor100% completed. - Time left:
15 seconds, rather than0 seconds.
- Favorites:
- Use
IBInspectableandIBDesignablewhen you find a proper opportunity. You will find good instructions in this blogpost. - Whenever possible, perform style operations directly in your storyboard and not via code (e.g.
font,textColor,backgroundColor, and the like). - Design them from left to right (→) and from top to bottom (↓), as this tweet states.
- User Interface elements in storyboards being as closest as possible to what they will look like at runtime makes them easier to read, understand and maintain.
- Smaller codebase, since lots of unnecessary lines of code are avoided.
- It prevents
UIViewControllerclasses from having noisy lines of code that distract their purpose and make them harder to read and maintain. - More robust and consistent project design caused by all developers following the same standards.