In this post, we will see how to resolve Non-regular shaped UIView with hit testing (workable with Gestures) on iOS Question: I want to be able to create a view that I can assign a gesture to, that is irregular ...

In this post, we will see how to resolve Coordinator pattern doesn’t work inside UIView Question: I have 2 buttons inside a View and I can’t understand why the Coordinator Pattern does not work for navigation with ViewControllers, only the ...

Question: I’ve been working on an application for a couple of years and received a simple design request: Round the corners on a UIView and add a drop shadow.To do as given below. I want a custom UIView… : I ...

Question: My login view has a subview which has a UIActivityView and a UILabel saying “Signing In…”. This subview has corners which aren’t rounded. How can I make them round? Is there any way to do it inside my xib? ...

Question: I have a tab bar application, with many views. Is there a way to know if a particular UIViewController is currently visible from within the UIViewController? (looking for a property) Best Answer: The view’s window property is non-nil if ...

Question: UIView and its subclasses all have the properties frame and bounds. What’s the difference? Best Answer: The bounds of an UIView is the rectangle, expressed as a location (x,y) and size (width,height) relative to its own coordinate system (0,0). ...

Question: I’m trying to draw lines with touches and then be able to move it. i didn’t use UIContext method with draw(_ rect: CGRect) for drawing because i wasn’t able to get size of stroke and some of it’s properties, ...

Question: I’ve downloaded AVCam app sample from Apple. I added a custom view “GridView” on top of PreviewView, but i would like to size my GridView in order draw my grid on top of the captured image. How can i ...

Question: I’m attempting to constrain two ui elements to the same place. At the beginning of my program, I’m constraining a label to the center of a UiView. This is working fine. However later in my program, I’m attempting to ...

Question: I want to dismiss keyboard when click on done button of UIBarButtonItem and I Don’t want to add selector function @objc method. #selector(UIView.endEditing) – This selector is working fine with UITapGestureRecognizer Doing same thing with UIBarButtonItem – It Crashing ...