Skip to content

Latest commit

 

History

History
14 lines (12 loc) · 561 Bytes

File metadata and controls

14 lines (12 loc) · 561 Bytes

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 it’s 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!