Skip to content

Instantly share code, notes, and snippets.

View asefnoor's full-sized avatar
🎯
Focusing

Asif Noor asefnoor

🎯
Focusing
  • ****
  • Toronto, Canada
View GitHub Profile
@asefnoor
asefnoor / horrible-storyboard.md
Created October 27, 2021 14:02 — forked from iraycd/horrible-storyboard.md
Bad Experiences with Storyboard.

Interestingly Apple doesn't even use Storyboards in their recently open-sourced ResearchKit as [Peter Steinberger has noticed][1] (under the subheading "Interface Builder").

As expected, Apple keeps improving Storyboards and Xcode. Some of the points that applied to iOS 7 and below don't apply to iOS 8 anymore (and are now marked as such). So while Storyboards inherently still have flaws, I revise my advice from don't use to selectively use where it makes sense.

Even now that iOS 7 is out, I would advise against to use caution when deciding whether to use Storyboards. Here are my reasons:

  • Storyboards fail at runtime, not at compile time: You have a typo in a segue name or connected it wrong in your storyboard? It will blow up at runtime. You use a custom UIViewController subclass that doesn't exist anymore in your storyboard? It will blow up at runtime. If you do such things in code, you will catch them early on, during compile time. Update: My new tool **[StoryboardLin
@asefnoor
asefnoor / closures.swift
Created October 5, 2019 22:45
Closures understanding
import UIKit
//Closures: Functions can be passed into another functions as parameters and can be returned from functions as well.
// Step 1
//func calculate (n1: Int, n2: Int) -> Int {
// return n1 * n2
//}