Question: I'm receiving the error:

> 
> Class AppDelegate has no initializers
> 
> 
> 

and cannot seem to understand why. I am following [this tutorial](https://www.youtube.com/watch?v=c-Uwa5v_3sc). I am a beginner so any help would be VERY appreciated!

My code:

```
import UIKit

@UIApplicationMain

class AppDelegate: UIResponder, UIApplicationDelegate {
    var window: UIWindow?
    var centerContainer: MMDrawerController

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
        // Override point for customization after application launch.

        _ = self.window!.rootViewController

        let mainStoryboard: UIStoryboard = UIStoryboard(name: "Main", bundle: nil)

        let centerViewController = mainStoryboard.instantiateViewController(withIdentifier: "ViewController") as! ViewController

        let leftViewController = mainStoryboard.instantiateViewController(withIdentifier: "LeftSideViewController") as! LeftSideViewController

        let leftSideNav = UINavigationController(rootViewController: leftViewController)
        let centerNav = UINavigationController(rootViewController: centerViewController)

        centerContainer = MMDrawerController(center: centerNav, leftDrawerViewController: leftSideNav)

        centerContainer.openDrawerGestureModeMask = MMOpenDrawerGestureMode.panningCenterView;

        centerContainer.closeDrawerGestureModeMask = MMCloseDrawerGestureMode.panningCenterView;

        window!.rootViewController = centerContainer
        window!.makeKeyAndVisible()

        return true
    }
}

```

Answer: 
Try changing your `centerContainer` property to an *optional* like this:

```
var centerContainer: MMDrawerController!

```

as such, it will be initialized with `nil`, which should be enough to remove the error you are having. (By the way, you shouldn't need to change the rest of your code as a result.)

From [The Swift Programming Language](https://developer.apple.com/library/content/documentation/Swift/Conceptual/Swift_Programming_Language/Initialization.html#//apple_ref/doc/uid/TP40014097-CH18-ID203) book:

> 
> Classes and structures *must* set all of their stored properties to an appropriate initial value by the time an instance of that class or structure is created. Stored properties *cannot* be left in an indeterminate state.
> 
> 
>
Make your `centerContainer` var optional like `window`. In swift, all of the properties must be initialized. When you make your var optional, you are initializing it as `nil`.

```
var centerContainer: MMDrawerController?

```