Skip to content

Xcode and iOS apps tips & tricks for beginners continued (part 4)

How to reset the DNS cache
Okay, not really specific to development, but I’ve had issues with my WiFi (thank you Mac for not providing Ethernet…) which lead my DNS cache to mistakenly record DNS lookup failures.
The latest command (run it as su or with sudo) is killall -HUP mDNSResponder, on today’s Mac OS 10.11.2. For commands for other versions, see this help page from Apple.

How to create an unwind segue
Detailed guide there with picture. Short summary:

  • In the view that will receive the segue, crate a function -(IBAction)unwindToSomePlace:(UIStoryboardSegue *)segue {...} (Objective-C) or @IBAction func unwindToSomePlace(segue: UIStoryboardSegue) {...} (Swift)
  • In the view that will perform the segue, CTRL+click the view controller and drag it to the Exit (of the same view). Xcode will then show you a list of all unwind segues on the storyboard and you can pick unwindToSomePlace
  • Give an identifier to the segue this added to your storyboard (the easiest place to find it is probably in document outline of the view that will perform the segue), for instance name it “unwindToSomePlaceSegue”
  • To perform the segue: [self performSegueWithIdentifier:@"unwindToSomePlaceSegue" sender:self] (Objective-C) or self.performSegueWithIdentifier("unwindToSomePlaceSegue", sender:self) (Swift)

Posted in published drafts, Xcode.

0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

Some HTML is OK

or, reply to this post via trackback.

Sorry about the CAPTCHA that requires JS. If you really don't want to enable JS and still want to comment, you can send me your comment via e-mail and I'll post it for you.

Please solve the CAPTCHA below in order to fight spamWordPress CAPTCHA