Ios swift – How to change SwiftUI TabView dot indicator shape?
I want to change the shape of the dot to a rounded rectangle which ever tab is selected. First Image is the current dot style paging: But I want it to change to 2nd Image kind of:
I want to change the shape of the dot to a rounded rectangle which ever tab is selected. First Image is the current dot style paging: But I want it to change to 2nd Image kind of:
Currently, we are implementing an undo/redo feature in UITextView. However, we cannot use the built-in UndoManager in UITextView because we have multiple UITextView instances inside a UICollectionView. Since UICollectionView recycles UITextView instances, the same UITextView might be reused in different…
I'd like to know if there is a good existing way to wrap a UIKit inside SwiftUI when the initializer of the UIKit component can throw an error. As a context, I'm using this article to create a generic wrapper…
I want to make the table view divider line dotted and add a margin on the left. The source is below and I tried adjusting the x of shapeRect, botttomShapeLayer.positon, and UIBezierPath, but was not successful. How can I give…
Hello everyone junior dev here, I fetch data from server in background thread and update ui in main thread, it works but i also have separate ui image loader from url here: extension UIImageView { func load(url: String) { guard…
I have been trying to create a protocol and delegate between custom UI button and parent-child view controller. Briefly, I have a parent view controller, a child view controller, and a custom UI button. Custom UI button and child VC…
First of all, please understand that I use a translator. I'm using the UIAActivityViewController to create a feature that shares images and texts. When I run the sharing function, I get a message like below from the console. Does anyone…
I have a single-line UILabel with the following configuration: let label = UILabel() label.text = "Lorem ipsum dolor sit amet" label.numberOfLines = 1 When I call sizeThatFits(size) on this label with a small size width, the result is always a…
I tried multiple solutions from stack overflow but no luck. I have set HighlightedAdjustsImage = false In my Code : button.backgroundColor = .clear button.layer.borderWidth = 0 inside my IBAction for button I am changing image and also setting value of…
I'm a novice at Swift. I want to create a button that changes color when pressed by the user. However, it ought to revert back to the original color when the user removes the finger from the button. I tried…