While trying to set a custom rootViewController in swift with a UIWindow, in the traditional way results in a black screen. The reason is now we need to use UIWindowScene to create a UIWindow instance.
It is a very tough job to delete 9gag comments from a very active thread as your comment will be hidden somewhere amongst thousands of comments. But I will share with you an easy way to do it. Using this method you will be able to go to your comments directly one by one and delete them no need to search for needles in a haystack.
Easy examples to basic swift timer functionality like passing user info, creating repeating swift timers invalidating swift timers and more
. In SwiftUI we can create views in a loop using ForEach. ForEach is a view structure i.e you can use it directly in the body. Example code is given below
So you have added a new file to .gitignore or you have just added a new .gitignore file to your existing repo. The problem is same you don’t want git to rack one or many files. This can be archived in simple 3 step process. Assuming that you have already added or updated .gitignore file … Read more
Git branch can be deleted easily using following commands Most of the time remote name is origin. For deleting git branch locally you can use following command If you are working in a large team and you don’t want to keep deleted branch locally you can prune your repo by using following command Hope this … Read more
There are situation when you mess up so bad you want to just go back and restart again. Fortunately If you are using Git then you can do it. We will be discussing ways in which git allows you to revert to previous commit 1.Git reset Git rest moves your head to a specific commit. … Read more
We are all familiar with the error “Switch must be exhaustive”. Adding a default or adding all cases can resolve this error condition but what if
When you need to change the text color of status bar to white in order to enhance visibility you can proceed as shown below Set the UIViewControllerBasedStatusBarAppearance to YES in the .plist file. In the viewDidLoad do a [self setNeedsStatusBarAppearanceUpdate]; Add the following method: In order to cater for ViewControllers embedded in a NavigationController use this insted SwiftUI For swift UI add … Read more