Implementing factory design pattern in Swift

3 responses

  1. Antonio Montes Avatar
    Antonio Montes

    class Map {
    let type : Int = 0
    func showMap…
    should be:
    class Map {
    let type: Int = 0
    func makeMap…
    and then:
    let map = Map()
    will show:
    showing google map
    showing apple map

    1. darshan Avatar

      Why would you suggest that ?

Leave a Reply

Your email address will not be published. Required fields are marked *