Skip to content

samuelbeek/swift-cheat-sheet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 

Repository files navigation

Swift Cheat Sheet

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)

About

These are things I look up frequently or spent some time figuring out. I hope they help you too

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages