These templates are designed to speed up and make the iOS development so much easier by eliminating the repeating processes and making your code better organized.
The templates are using some reactive libraries such as RxSwift, RxCocoa and RxDataSources.
To install the templates run the install-templates.sh
script in the terminal.
./install-templates.sh
If you'd like to remove the previously installed templates run the uninstall-templates.sh
script.
./uninstall-templates.sh
For updating the templates you must remove them first, then run the install script.
./uninstall-templates.sh
./install-templates.sh
Add these pods to your Xcode project:
pod 'RxSwift', '~> 4.1.1'
pod 'RxCocoa', '~> 4.1.1'
pod 'RxDataSources', '~> 3.0.2'
You also have to add the files from TableView Requirements template.
Just press CMD + N or right click on your source files in Xcode and select New file....
Scoll down to MV[C]VM - Utilities section and select TableView Requirements. Then click on Next and Create.
Now you're done and you can use all the templates.
-
Add a
Cell with Model
from the previously installed templates. -
Add the necessary properties to your model.
-
Add an
init()
method to the model and pass these properties as parameters.
- Add properties (
Variable
types) to the viewmodel which going to be connected with the cell's outlets. - In the viewmodel there'll be a variable
var model
with the same type of the model. This variable will have adidSet
method. Update the viewmodel properties here.
- Create the outlets in the cell. (Not required in this example.)
- Bind the cell's outlets with the viewmodel's properties in the
setUpBindings()
method.
- Add a
TableView-IH with [multi sections]
from the previously installed templates. - Fill the ViewController's viewmodel with some data (sections property).
- Add a UITableViewController to the storyboard and set its class.
- Set the entry point.
- Add a prototype cell to the tableview and set its class and the reuseidentifier.
- Also add the necassary outlets and constraints to the cell. (Not required in this example.)
- Connect these outlets with the code. (Not required in this example.)
- Build and run. 🎉
-
Detailed example (Coming soon.)
All donations are appreciated. ❤️
-
BTC address: 127tUY5nWP3ucv6uweion1cCGeraEXsfzV
-
ETH address: 0x53510eB7E2C683E28ecefEfc0B0a887227ed3da6
Don't forget to leave a star here. 😀👍
Commit Type | Emoji |
---|---|
Initial Commit | 🎉 Party Popper |
Metadata | 🔖 Bookmark |
New Feature | ✨ Sparkles |
Bugfix | 🐛 Bug |
Version tag | 🎟️ Admission Tickets |
Refactoring | ♻️ Black Universal Recycling Symbol |
Documentation | 📚 Books |
Internationalization | 🌐 Globe With Meridians |
Performance | 🐎 Horse |
Cosmetic | 🎨 Artist Palette |
Tooling | 🔧 Wrench |
Tests | 🚨 Police Cars Revolving Light |
Deprecation | 💩 Pile of Poo |
Removal | 🗑️ Wastebasket |
Work In Progress (WIP) | 🚧 Construction Sign |
Lint | 👕 :shirt: |
Translation | 👽 :alien: |
Critical hotfix | 🚑 :ambulance: |
Accessibility | ♿ :wheelchair: |
Code review changes | 👌 :ok_hand: |
Analytics or tracking code | 📈 :chart_with_upwards_trend: |
Removing a dependency | ➖ :heavy_minus_sign: |
Adding a dependency | ➕ :heavy_plus_sign: |
Security | 🔒 :lock: |
General update | ⚡ :zap: |
Text | 📝 :pencil: |