A small tour of common iOS UI components written in Swift. Using a typical master-detail layout with a UISplitViewController, SiwftComponentsTour is a simple introduction to some of the basic iOS UI components that Apple provides for. The goal of this app is to give iOS beginners and Swift newbies a look into how to use these components and customize them to fit their own projects. As well as seeing some clean code, there is also plenty of storyboards, autolayout, light animation, navigation basics, and a few tips and tricks.
Text Components
Examples of how to display text, editable and not, and how to choose between the components
- Labels
- The simplest way to display static text + some customization
- Text Fields
- A label with user interaction. How to get user events and changes from a users press of their keyboard
- Text Views
- Another editable text component, though with more support for in line content and multiple-line scrolling display
Controls
Examples of each basic component provided by Apple and how to choose between them
- Buttons
- Most straightforward UIControl, tap it and it works
- Switches
- A toggleable button and an alternate use for UIButtons
- Sliders
- Choose a value on a scale while seeing the entire effect of the range of values
- Segmented Controls
- iOS's radio buttons, how to work with them
- Steppers
- A 2-piece segmented button used to increment a value, how can we use it
Advanced Interaction
A section for components that may not technically be UIControls but can be used in similar ways to comminute with users without directly telling them what is happening, or for other ways for the user to interact with the app.
- Progress and Activity
- Communicate that something may be happening in the background with these two components
- Pickers
- Can be displayed inline or implemented as the input view for another component for an easy to display and choose from many string values
- Gestures
- "Invisible buttons", swiping, pinching, everything you've picked up from using your iPhone
- Accelerometer
- Everyone's favorite way to control a game can be used outside of said game, a small part of the Core Motion framework
- Another section on specialty view controllers (table, collection)
- More on navigation (tab, navigation, modal, containment)
- Custom appearance
##Screencasts Videos about the app will be posted to our YouTube Channel. Most of the videos are short (5-6 minutes or less) and are intended to help you learn more about iOS development. Feel free to subscribe, leave feedback and learn!
See our other, more advanced app to really see what you can do with iOS. (https://github.com/JeffBNimble/LoLBookOfChampions-ios-sqlite)