Skip to content

Instantly share code, notes, and snippets.

Last active May 31, 2021
What would you like to do?
Storybook-ios demo app starter template
import UIKit
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
let newWindow = UIWindow()
newWindow.rootViewController = RootContainerViewController()
self.window = newWindow
return true
import StorybookKit
import StorybookKitTextureSupport
import TextureSwiftSupport
let book = Book(title: "MyBook") {
BookText("Hello, MyBook")
import StorybookKit
import StorybookUI
import UIKit
final class RootContainerViewController: UIViewController {
init() {
super.init(nibName: nil, bundle: nil)
let child = StorybookViewController(
book: book,
dismissHandler: nil
child.view.frame = view.bounds
child.view.autoresizingMask = [.flexibleWidth, .flexibleHeight]
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment