These are things that I lookup frequently or solutions I spent some time on. I hope they can help you too. This file will grow as I continue to build in Swift. My goal with this is to create a living document that ties together a lot of the disparate Swift solutions out there as people begin to pick up speed on the language.
(listed in order of appearance)
- Creating background gradients
- Playing a sound with AVFoundation
- Editing the text of a UIButton
- Setting the value of a textField a variety of ways
- Removing the keyboard from the view
- Focusing on a textField and bringing up the keyboard
- Hiding the status bar at the top of the view (the one with the battery and clock)
- Getting the last value of a model from CoreData
- Better storage of objects in CoreData
- Keep the phone from going to sleep
- Dismiss keyboard when pressing return in a UITextView
- Set a maximum amount of characters in a UITextView
- Add a person to AddressBook
- Use HexColors codes for UIColor
- Setting and retrieving NSUserDefaults
- Create a NSAttributedString
- Make a Screenshot
- More to come
Created and Curated by @ZackShapiro
Additions by: @SamuelBeek
(Feel free to fork this and edit, update, remix, or create your own. Feedback and pull requests are welcome)