Beans Creation Scan the application to create beans Create beans and their dependencies Invoke init() Call initialization method (if configured) Defined in three different ways for different configurations Invoked once then bean and its dependencies are created Use beans in Application Using the beans in the application according to the requirements Invoke destroy() Call destroy …
The Structure of a SwiftUI App
I plan to write a SwiftUI app, so I would like to explore the structure of a SwiftUI app first. I found this developer document and would like to take note of it. SwiftUI is a declarative framework that helps you compose the user interface of your app. The principle building blocks that form the …
How to add open source library to SwiftUI project?
Clieck “File” in XCode 2. Copy & paste the library git link 3. Set the dependency 4. Waiting for download
Git: WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!
Delete the host name by the prompt, and then push codes again.
How to set icon color in Swift?
We can set the icon from SF Symbols in the code: But what if we don’t like the default color of the icon? We can change them by:
Structures and Classes in Swift
Comparing Structures and Classes Structures and classes in Swift have many things in common. Both can: Define properties to store values Define methods to provide functionality Define subscripts to provide access to their values using subscript syntax Define initializers to set up their initial state Be extended to expand their functionality beyond a default implementation …
How to upload big files(like videos) to GitHub?
1. Down git-lfs [link](https://git-lfs.com/) 2. In command line 3. Tracking file type 4. Add gitattribute file 5. push
How and Why to use dynamic_cast in C++?
When you assign an object of a derived class to an object of a base class, the derived class portion of the object gets sliced off. So if you simply try to call the employee base class operator= function to copy the entire employee portion of the object, the derived class portion will be lost. …
Keyword “const” in C++
When declaring a member function as const, it means that the function is not allowed to modify the object on which it is called. This allows you to call the function on a const object, ensuring that the object’s state is not changed. In the case of the getFirstName() member function in the example I …
“A:class type redefinition” error in C++
The error “class type redefinition” typically means that you have multiple definitions of the same class in your code, which can cause conflicts and errors. This error can occur if you have included the header file for class A in both A.cpp and B.cpp, or if you have included it multiple times in B.cpp. When …