Skip to content

Commit

Permalink
🛠 Refactor: Split RNIViewControllerLifeCycleNotifiable
Browse files Browse the repository at this point in the history
Summary: Extract extension in `RNIViewControllerLifeCycleNotifiable` into its own file in `ios/src_library/React Native/RNIViewControllerLifeCycleNotifiable`.
  • Loading branch information
dominicstop committed Apr 26, 2023
1 parent 8ca3e9e commit 1332601
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 33 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
//
// RNIViewControllerLifeCycleNotifiable+Default.swift
// react-native-ios-modal
//
// Created by Dominic Go on 4/27/23.
//

import Foundation

extension RNIViewControllerLifeCycleNotifiable {
public func viewDidLoad(sender: UIViewController) {
// no-op
};

public func viewDidLayoutSubviews(sender: UIViewController) {
// no-op
};

public func viewWillAppear(sender: UIViewController, animated: Bool) {
// no-op
};

public func viewDidAppear(sender: UIViewController, animated: Bool) {
// no-op
};

public func viewWillDisappear(sender: UIViewController, animated: Bool) {
// no-op
};

public func viewDidDisappear(sender: UIViewController, animated: Bool) {
// no-op
};

public func willMove(sender: UIViewController, toParent parent: UIViewController?) {
// no-op
};

public func didMove(sender: UIViewController, toParent parent: UIViewController?) {
// no-op
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -33,36 +33,3 @@ public protocol RNIViewControllerLifeCycleNotifiable: AnyObject {

};

extension RNIViewControllerLifeCycleNotifiable {
public func viewDidLoad(sender: UIViewController) {
// no-op
};

public func viewDidLayoutSubviews(sender: UIViewController) {
// no-op
};

public func viewWillAppear(sender: UIViewController, animated: Bool) {
// no-op
};

public func viewDidAppear(sender: UIViewController, animated: Bool) {
// no-op
};

public func viewWillDisappear(sender: UIViewController, animated: Bool) {
// no-op
};

public func viewDidDisappear(sender: UIViewController, animated: Bool) {
// no-op
};

public func willMove(sender: UIViewController, toParent parent: UIViewController?) {
// no-op
};

public func didMove(sender: UIViewController, toParent parent: UIViewController?) {
// no-op
};
};

0 comments on commit 1332601

Please sign in to comment.