An open API service indexing awesome lists of open source software.

https://github.com/intrepidpursuits/code-style-exercise-ios

Code style exercise for iOS apprentices
https://github.com/intrepidpursuits/code-style-exercise-ios

Last synced: 4 months ago
JSON representation

Code style exercise for iOS apprentices

Awesome Lists containing this project

README

          

# Exercise - iOS Code Style

### Overview:
Practice writing and refactoring clean code with good style

### Getting Started:

1. Clone this repository to create a local copy on your computer

```
git clone https://github.com/IntrepidPursuits/code-style-exercise-ios.git
```
2. Create a branch called `/clean-code`

```
git checkout -b /clean-code
```

### The App:

The app uses a `UICollectionView` to display a randomized color palette. When a colored square is tapped, its hex value appears in either black or white depending on the lightness or darkness of the color. When the "Generate New Colors" button is tapped, the palette refreshes and displays the user-defined number of colored squares. If no value is specified, it defaults to 12 squares.

### Your Task:

Go through the code provided and fix any style issues you find. The fixes for the problems can range from small (e.g. spacing) to large (e.g. completely refactor the logic flow). Remember that we're aiming for clarity over brevity. If you need help, refer to the [Intrepid Swift Style Guide](https://github.com/IntrepidPursuits/swift-style-guide).

### When You're Done:

1. Push your branch up to Github

```
git push origin /clean-code
```
2. Create a pull request on Github and fix any issues found in code review