aaronland / ios-wunderkammer

BSD 3-Clause "New" or "Revised" License
7 stars 0 forks source link

Devise a better way to enable/load collections #19

Open straup opened 4 years ago

straup commented 4 years ago

This is not sustainable:

        let enable_example = Bundle.main.object(forInfoDictionaryKey: "EnableExample") as? String

        if enable_example != nil && enable_example == "YES" {

            let example _collection =ExampleCollection()

            if example _collection == nil {
                self.showAlert(label:"There was a problem configuring the application.", message: "Unable to initialize Example collection.")
            } else {
                self.collections.append(example _collection!)
            }
        }