book--hacking-with-swift/challenges/extensions
CypherPoet 167f047b69 Complete Extensions Challenge 2019-02-11 03:44:13 -05:00
..
MyPlayground.playground Complete Extensions Challenge 2019-02-11 03:44:13 -05:00
README.md Complete Extensions Challenge 2019-02-11 03:44:13 -05:00

README.md

Extensions Challenge

From the Handbook:

  1. Extend the Integer protocol with an isEven() method that returns true if a number is even and false if its odd.

  2. Extend String with a length property that returns the number of characters it has.

  3. Extend UIView so that it has a bounceOut(duration:) method that uses animation to scale its size down to 0.0001 over a specified number of seconds.

  4. Extend Array so that it has a mutating remove(item:) method. Tip: you will need to add the Comparable constraint to make this work!