Skip to content

Commit a792049

Browse files
authored
Hide UIViewController method/properties in UIKit Example code (#3238)
* refactor: hide decrementButtonTapped function * refactor: hide incrementButtonTapped function * refactor: hide CounterViewController's store * refactor: hide CountersTableViewController's store * refactor: hide EagerNavigationViewController's store * refactor: hide LazyNavigationViewController's store * refactor: hide IfLetStoreController's stored properties
1 parent ce15c88 commit a792049

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

Examples/CaseStudies/UIKitCaseStudies/CounterViewController.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ struct Counter {
2929
}
3030

3131
final class CounterViewController: UIViewController {
32-
let store: StoreOf<Counter>
32+
private let store: StoreOf<Counter>
3333

3434
init(store: StoreOf<Counter>) {
3535
self.store = store
@@ -75,11 +75,11 @@ final class CounterViewController: UIViewController {
7575
}
7676
}
7777

78-
@objc func decrementButtonTapped() {
78+
@objc private func decrementButtonTapped() {
7979
store.send(.decrementButtonTapped)
8080
}
8181

82-
@objc func incrementButtonTapped() {
82+
@objc private func incrementButtonTapped() {
8383
store.send(.incrementButtonTapped)
8484
}
8585
}

Examples/CaseStudies/UIKitCaseStudies/Internal/IfLetStoreController.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ import ComposableArchitecture
33
import UIKit
44

55
final class IfLetStoreController<State, Action>: UIViewController {
6-
let store: Store<State?, Action>
7-
let ifDestination: (Store<State, Action>) -> UIViewController
8-
let elseDestination: () -> UIViewController
6+
private let store: Store<State?, Action>
7+
private let ifDestination: (Store<State, Action>) -> UIViewController
8+
private let elseDestination: () -> UIViewController
99

1010
private var cancellables: Set<AnyCancellable> = []
1111
private var viewController = UIViewController() {

Examples/CaseStudies/UIKitCaseStudies/ListsOfState.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ struct CounterList {
2323
let cellIdentifier = "Cell"
2424

2525
final class CountersTableViewController: UITableViewController {
26-
let store: StoreOf<CounterList>
26+
private let store: StoreOf<CounterList>
2727

2828
var observations: [IndexPath: ObservationToken] = [:]
2929

Examples/CaseStudies/UIKitCaseStudies/LoadThenNavigate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ struct LazyNavigation {
5353
}
5454

5555
final class LazyNavigationViewController: UIViewController {
56-
let store: StoreOf<LazyNavigation>
56+
private let store: StoreOf<LazyNavigation>
5757

5858
init(store: StoreOf<LazyNavigation>) {
5959
self.store = store

Examples/CaseStudies/UIKitCaseStudies/NavigateAndLoad.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ struct EagerNavigation {
4949
}
5050

5151
final class EagerNavigationViewController: UIViewController {
52-
let store: StoreOf<EagerNavigation>
52+
private let store: StoreOf<EagerNavigation>
5353

5454
init(store: StoreOf<EagerNavigation>) {
5555
self.store = store

0 commit comments

Comments
 (0)