Sha256: 1f2d309fd0d397482cbf3992eccff282e60669562dcfd04bfac5d353827b1d90

Contents?: true

Size: 571 Bytes

Versions: 8

Compression:

Stored size: 571 Bytes

Contents

import UIKit
import Turbo

final class ViewController: VisitableViewController, ErrorPresenter {
    override func viewDidLoad() {
        super.viewDidLoad()

        navigationItem.backButtonTitle = "Back"

        if presentingViewController != nil {
            navigationItem.leftBarButtonItem = dismissModalButton
        }
    }

    private lazy var dismissModalButton = {
        UIBarButtonItem(barButtonSystemItem: .cancel, target: self, action: #selector(dismissModal))
    }()

    @objc private func dismissModal() {
        dismiss(animated: true)
    }
}

Version data entries

8 entries across 4 versions & 1 rubygems

Version Path
turbo-native-initializer-0.0.9 lib/turbo_native_initializer/templates/ios_stack/TurboNativeProject/Controllers/ViewController.swift
turbo-native-initializer-0.0.9 lib/turbo_native_initializer/templates/ios_tabs/TurboNativeProject/Controllers/ViewController.swift
turbo-native-initializer-0.0.8 lib/turbo_native_initializer/templates/ios_stack/TurboNativeProject/Controllers/ViewController.swift
turbo-native-initializer-0.0.8 lib/turbo_native_initializer/templates/ios_tabs/TurboNativeProject/Controllers/ViewController.swift
turbo-native-initializer-0.0.7 lib/turbo_native_initializer/templates/ios_stack/TurboNativeProject/Controllers/ViewController.swift
turbo-native-initializer-0.0.7 lib/turbo_native_initializer/templates/ios_tabs/TurboNativeProject/Controllers/ViewController.swift
turbo-native-initializer-0.0.6 lib/turbo_native_initializer/templates/ios_stack/TurboNativeProject/Controllers/ViewController.swift
turbo-native-initializer-0.0.6 lib/turbo_native_initializer/templates/ios_tabs/TurboNativeProject/Controllers/ViewController.swift