Ios swift – Collection View cells affect each other
I have placed a toggle button in the collection view cells. I want to check each cell, but when I do this in a cell, when I do this in a cell, there is a check in other cells, when…
I have placed a toggle button in the collection view cells. I want to check each cell, but when I do this in a cell, when I do this in a cell, there is a check in other cells, when…
I have an app where I just created a new, working viewController in a separate project. I copy/pasted the code and xibs (several subviews) into the new project. All compiles fine. Relevant code: let storyBoard : UIStoryboard = UIStoryboard(name: "Main",…
I am showing a complicated controller AskController (descended from UIViewController, UIPopoverPresentationControllerDelegate and UIPopoverControllerDelegate) over some different controllers, popover style. Is there an easy way to automatically dim and blur whatever happens behind said AskController, and remove those effects on a…
I am currently in the process of learning Swift as a beginner and I am using Xcode 14.2 for my learning journey. In the tutorial book I am following, it mentions the ability to configure the "lifecycle" within UIKit App…
I am trying convert an UIView into an UIImage using UIGraphicsImageRenderer. I have applied shadows on my UIView but shadows gets removed in output image. Here's my code: let view = UIView(frame: .init(origin: .zero, size: compressedImage.size)) view.backgroundColor = .lightGray view.layer.shadowColor…
I'm trying to make a custom header for 0 section of my UITableView. Here's the code I'm using to create this header: class ProfileHeaderView: UITableViewHeaderFooterView { // MARK: - Subviews private var statusText: String = "" private lazy var userImage:…
I have to create an app Which will work in different languages and show the content of app in different languages that i select from the language list. I have list of three languages :- 1. English , 2. Hindi…
I have the following code in my custom UIView. This gets called from init(frame:) or init(coder:) initializer: private func setupContentView() { contentView = ContentView(frame: .zero) contentView.translatesAutoresizingMaskIntoConstraints = false addSubview(contentView) contentView.leftAnchor.constraint(equalTo: leftAnchor, constant:thumbWidth).isActive = true contentView.rightAnchor.constraint(equalTo: rightAnchor, constant: -thumbWidth).isActive = true…
I'm completing the online apple Xcode Tutorial. At the UIKit tutorial portion, I'm repeatedly getting the same error: "Type 'PageViewController<Page>' does not conform to protocol 'UIViewControllerRepresentable'" That portion of the tutorial is a few lines which are copied and pasted:…
Without prefersLargeTitles, I should have to pull down a bit before the UIRefreshControl begins the refresh, but when I turn on large titles, it starts instantly. I have removed the Storyboard and I am trying to create everything programatically. What…