A collection of scalable UIViews displaying top down drawings of various fields/arenas/courts.
Slowly adding in some of the most popular sports before putting together into a framework.
- Learn more about drawing views.
- Make something scalable
- Sports are fun to code
- Create something for CocoaPods
Inspired by HockeyView
🚨Work in progress til done.🚨
- Make UIView any width and set ratio based on table below. ratio of 40:17
- Make class your desired SwiftySport view.
- Drag outlet from Storyboard into your ViewController.
- Add
SwiftySport.dataSource = selfandSwiftySport.drawToScale()to yourviewDidLoad(). - Set width in dataSource method
SwiftySport view's themes can be changed as vars of the view. See tables below for more info.
Ratios
I need to rework this to be more sectional. Each rink/court/field should have its own section to discuss theming, modifications, and unique featuers.
| Type | Ratio |
|---|---|
| Hockey rink | 40:17 |
| Tennis Court | 13:6 |
| Soccer Field | 105:68 |
Themes
| IceRinkView | TennisCourtView | SoccerFieldView |
|---|---|---|
| iceColor | courtColor | fieldColor |
| redLineColor | lineColor | lineColor |
| blueLineColor | ||
| boardColor | ||
| creaseColor |
- Make into Framework
- Set up CocoaPods
- Add tennis court
- Add soccer field
- Add football field
- Add basketball court
- Add baseball field...