I have read a lot of articles in internet, where people explaining what each layer responsobility is, and that router or in some articles "constructor" should create whole VIPER module. But no one does not explain where to create them and how (most of them use class function that return view controller, but where I should use this return value?). In my case I have initial UITabBarViewController and my single suggestion is to call a class function in viewDidLoad, but again what I should do with this return value (some view controller). I totally confused and will be very appreciated for some help. Thanks in advance!
Where should VIPER modules be initiated in UIKit project
135 views Asked by Igor Ševtšenko At
1
There are 1 answers
Related Questions in SWIFT
- Navigate after logged in with webservice
- URLSession requesting JSON array from server not working
- When using onDrag in SwiftUI on Mac how can I detect when the dragged object has been released anywhere?
- Protect OpenAI key using Firebase function
- How to correct error: "Cannot convert value of type 'MyType.Type' to expected argument type 'Binding<MyType>'"?
- How to share metadata of an audio url file to a WhatsApp conversation with friends
- Using @Bindable with a Observable type in SwiftUI
- How to make a scroll view of 9 images in a forEach loop open on image 6 if image 6 is clicked on from a grid?
- Using MTLPixelFormat.rgba16Float results in random round-off errors
- Search and highlight text of current text in PDFKit Swift
- How is passing a function as a parameter related to escaping autoclosure?
- Actionable notification api call not working in background
- Custom layout occupies all horizontal space
- Is it possible to fix slow CKAsset loading on Cloudkit?
- Thread 1: Fatal error: Unexpectedly found nil while implicitly unwrapping an Optional value - MapView.isMyLocationEnabled
Related Questions in UIKIT
- Thread 1: Fatal error: Unexpectedly found nil while implicitly unwrapping an Optional value - MapView.isMyLocationEnabled
- Can't display the simplest UIToolbar
- Label not showing on Tutorial SKScene
- UIViewRepresentable how do you change UIToolBar UIBarButtonItem image when it is selected?
- UIScrollView.setContentOffset() cannot set to the specified position in certain cases
- Need event when iOS app terminated by the user
- Custom context menu corner radius
- Override show(_:sender:) of UIViewController freezes the UI
- How to dismiss the first scene in UIKit Application?
- How to use RxSwift to draw the UICollectionView cells according to the number of data
- How can I trigger macOS system gamepad API based on a value received from iOS app through core bluetooth
- How to make tableview reload correct data?
- How can I implement this transition in pure Swift (UIKit)
- Present UIViewController using sheetPresentationController inside UINavigationController
- Access UINavigationItem from within MAUI ContentPage (in order to add native buttons to navigationbar)
Related Questions in VIPER-ARCHITECTURE
- How can I break down a large presenter in the Viper design pattern into smaller pieces?
- No definition registered for type: project_save.NewDashboardAccessors, arguments: (), tag: nil
- Is it allowed to make Multiple navigation in one router VIPER function?
- How can I decode and deserialize json from 'the movie db' using VIPER?
- Getting Data from Presenter No reflecting in View Controller Tableview Cell
- How to initialize view controller of a container view with viper design pattern in swift?
- Changes of entity from 1-st VIPER module don't affect on 2-nd VIPER module using same entity
- ViewController see count of object in Presenter, but don't display them
- Where should VIPER modules be initiated in UIKit project
- SwiftUI View don't see property of ObservableObject marked with @Published
- Router navigation in VIPER + Swinject
- How to correctly send data/call module from another module in VIPER (swift)?
- Viper handle table cell action
- Pass data between VIPER modules
- Multiple View Controllers in a single VIPER module
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Popular Tags
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
VIPER is best thought of as autonomous zones that run their own internal affairs behind each zone's façade. The begin & end of life of internal affairs (e.g., UIKit instances within V[iew] zone) is managed as side-effects of messaging through the V zone's façade. That message to the V zone's façade originates either
Specific to your narrower question of what instantiates UITabBarViewController and what retains the return value of viewDidLoad, that would be the V zone's façade as part of managing the internal affairs of object-instance lifetimes within V zone as a side-effect of the V-zone façade's awareness (via interzone messaging mostly from P zone and less often direct from R zone) of the current accumulated state of the app that implies the current accumulated state of the UI that V zone manages as its internal affairs.
It is best to keep in mind: what if I were to remove all of iOS for iPhone/iPad from V zone to instead, say, put in substantially different MacOS operations (or any other UI supported by your choice of language, which is most likely Swift or Objective-C)? If the V zone is designed/architected properly with all UI details behind V zone's façade and with all non-UI state-of-the-app stuff in all the I, P, E, and R zones, then the port from iPhone/iPad to MacOS would be rather easier due to the self-containment of V zone, due to changing only the guts within V zone behind V zone's façade.
This all raises the question of how should the façade be designed to present a well-thought-out isolation of V zone to the other I, P, E, and R zones. Generally, the E[ntities] zone contains parameters that appear within interzone messages between the zones' respective façades, so entities are usually fairly obvious data flowing in the app that has no direct representation in Apple frameworks, but rather has a reason to exist independent of the internals of the UI operations regarding Apple frameworks. Beyond the entities, the OO design of the façades of each zone (and most especially the hide-Apple-speak mission of V zone's façade) is 100% your choice other than there should not be one iota of Apple framework content in the V zone's façade presented interzone to I, P, E, and R zones. At a very minimum, V zone's façade could be one enormous class with one singleton instance with a gargantuan amount of methods/messages; there is some simplicity & beauty to such a monolithic façade. But modern OO taste would be to break up that monolith into broad app-centric (as opposed to Apple-framework-centric or even UI-operation-centric) topics that each have a singleton instance. The content of the V zone's façade should not speak (in topic or in message) of such brutal details as “pop up such-and-such dialog box” but rather “notify user of such-and-such” so that perhaps it is popping up a dialog box on iPad, updating a region of the larger screen on iPad, and something quite different on MacOS, all of which are internal affairs within V zone that the rest of the app('s zones) don't really care about which UI gizmo was enacted on various OSes/platforms.