Handy Hints

  • To generate a Random number between 1 and 100, for example, use:
let aRandomNumber = 1 + Int(arc4random_uniform(100))
  • self must be used in closures when using a class’ method.
  • For a more professional look, hide the Status Bar in IOS when launching your app. The setting is in Xcode, Project Settings,  Deployment Info, Hide Status Bar.
  • to round to the nearest integer use lroundf()
  • to fit a control to the size of it’s content (e.g. so the all the text is visible), in Xcode use ⌘=

Leave a Reply

Your email address will not be published. Required fields are marked *