Category "cocoa-touch"

How to get a swift enum's associated value regardless of the enum case

I have an object FormField which has two properties: a String name, and a value which can accept any type--hence I've made it Any!. However, I've been told in a

Make a UIButton programmatically in Swift

I am trying to build UIs programmatically with Swift. How can I get this action working? override func viewDidLoad() { super.viewDidLoad() // Do any add

How do I cross dissolve when pushing views on a UINavigationController in iOS 7?

If I simply call the push method with: [self.navigationController pushViewController:viewController animated:YES]; then it uses a push animation. How do I c

Regex multiline matching

I was wondering if it's possible to make a regular expression to find all of the text that is in between the following two strings: mutablePath = CGPathCreateM

How to create Previous/Next buttons above keyboard like in Safari

I'm trying to add Previous/Next buttons above the keyboard like in mobile Safari. There are a lot of questions about that here on StackOverflow, but most answer

What's the height of a UITabBar on iOS 8, iOS 9, iOS 10, and iOS 11?

The height of the UITabBar seems to have changed between iOS 7 and 8/9/10/11. I'm posting this question for others to easily find the answer. So: What's the he

Simulator slow-motion animations are now on?

A while ago I was experimenting, trying to see if i could get navigation items to animate and scroll between each other. I don't know if this is related but su

iOS7 TextKit: bullet point alignment

I'm writing an app for iOS 7 only and I'm trying to get decent formatting on bullet points in a non-editable UITextView. It's easy enough to just insert a bull

UIButton label text is being clipped

I have a UIButton built in Interface Builder that has a default label. In Xcode, I'm changing the label text dynamically like so: myButton.titleLabel.text = @"

Save string to the NSUserDefaults?

How to save a string into the NSUserDefaults?