OKdevTV Docs
Home OKdevTV
ESC
ios 1 min read 1.5 KB Raw Markdown
On this page (11)

iOS

requirement

  • Mac
  • XCode
  • iPhone
  • Apple Developer ID

Simulator

  • Multi Simulator
text
cd /Applications/Xcode.app/Contents/Developer/Applications
open -n Simulator.app
open -n Simulator.app
  • Hardware > Device > choose others

Getting Started Develop iOS Apps Swift

Xcode

  • Toolbar
  • Editor Area
  • Navigator Area
  • Utility Area
    • Inspector pane
    • Library pane

ViewController Lifecycle

  • ViewController Lifecycle
  • viewDidLoad() :

  • viewWillAppear() :

  • viewDidAppear() :

Custom View

  • Custom class and storyboard element

  • Use UIStackView subclass as a container

  • Implement an initializer on a custom class

  • @IBInspectable, @IBDesignable

  • initializer

text
override init(frame: CGRect) {
    super.init(frame: frame)
}

required init(coder: NSCoder) {
    super.init(coder: coder)
}
  • Button status
    • normal, highlighted, focused, selected, and disabled

Define Data Model

  • failable, non-failable
  • Unit Test
    • cmd+U
    • XCTestCase

Table View

  • TableViewCell
  • TableViewController
  • NavigationController

  • segue

  • Bar Button Item

Persist Data

  • NSCoding
    • a protocol that enables a lightweight solution for archiving objects and other structures
  • static properties
  • instance properties

ref