Category "uiview"

Execute code when UIView has been visible for a specified time

In an iOS app (using UIKit), a specific action should be performed when a UIView has been "seen" by the user for at least 30 seconds. A generic approach or an e

Swift Autolayout headerview in UITableView

I'm trying to create a view that has some labels and a UITableView. First of all i tried to create a UIView => UIScrollview => UIView + UITableView After

GestureRecognizer in scrollView not working

I moved all my UIElements in a scrollView to avoid a loaded UIViewcontroller. But now the GestureRecognizers on the view does not work anymore. My View hierarc

iOS: Detect if the device is iPhone X family (frameless)

In my app there is some logic for frameless devices (iPhoneX, Xs Xs max, Xr). Currently it works base on the model of the devices, so, I detect the model by Dev

Rotate UIButton 360 degrees

I've been trying to run an animation that rotates my UIButton 360 degrees using this code: UIView.animateWithDuration(3.0, animations: { self.vineTimeCapButt

Load a UIView from nib in Swift

Here is my Objective-C code which I'm using to load a nib for my customised UIView: -(id)init{ NSArray *subviewArray = [[NSBundle mainBundle] loadNibNamed