Sha256: ff24b2714bfec2db420165dac716b5246b24cee6b5ae2330732fbedb8777b097

Contents?: true

Size: 539 Bytes

Versions: 6

Compression:

Stored size: 539 Bytes

Contents

import UIKit
import Turbo

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

        view.backgroundColor = .systemBackground

        navigationItem.backButtonDisplayMode = .minimal

        if presentingViewController != nil {
            navigationItem.leftBarButtonItem = UIBarButtonItem(barButtonSystemItem: .stop, target: self, action: #selector(dismissModal))
        }
    }

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

Version data entries

6 entries across 3 versions & 1 rubygems

Version Path
turbo-native-initializer-0.0.3 lib/turbo_native_initializer/templates/ios_stack/TurboNativeProject/Controllers/ViewController.swift
turbo-native-initializer-0.0.3 lib/turbo_native_initializer/templates/ios_tabs/TurboNativeProject/Controllers/ViewController.swift
turbo-native-initializer-0.0.2 lib/turbo_native_initializer/templates/ios_stack/TurboNativeProject/Controllers/ViewController.swift
turbo-native-initializer-0.0.2 lib/turbo_native_initializer/templates/ios_tabs/TurboNativeProject/Controllers/ViewController.swift
turbo-native-initializer-0.0.1 lib/turbo_native_initializer/templates/ios_stack/TurboNativeProject/Controllers/ViewController.swift
turbo-native-initializer-0.0.1 lib/turbo_native_initializer/templates/ios_tabs/TurboNativeProject/Controllers/ViewController.swift