Run Loop Sequence of Events

  1. Notify observers that the run loop has been entered.
  2. Notify observers that any ready timers are about to fire.
  3. Notify observers that any input sources that are not port based are about to fire.
  4. Fire any non-port-based input sources that are ready to fire.
  5. If a port-based input source is ready and waiting to fire, process the event immediately. Go to step 9.
  6. Notify observers that the thread is about to sleep.
  7. Put the thread to sleep until one of the following events occurs: An event arrives for a port-based input source. A timer fires. The timeout value set for the run loop expires. The run loop is explicitly woken up.
  8. Notify observers that the thread just woke up.
  9. Process the pending event. If a user-defined timer fired, process the timer event and restart the loop. Go to step 2. If an input source fired, deliver the event. If the run loop was explicitly woken up but has not yet timed out, restart the loop. Go to step 2.
  10. Notify observers that the run loop has exited.

ref:https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/Multithreading/RunLoopManagement/RunLoopManagement.html#//apple_ref/doc/uid/10000057i-CH16

显示 MacOS 隐藏文件

显示Mac隐藏文件的命令:

defaults write com.apple.finder AppleShowAllFiles -bool true

隐藏Mac隐藏文件的命令:

defaults write com.apple.finder AppleShowAllFiles -bool false

iOS SizeClass

Alt none

Android Studio Make Jar

task clearJar(type: Delete) {
    delete 'build/outputs/jar/something-release.jar'
}

task makeJar(type: Copy) {
    from('build/intermediates/bundles/release/')
    into('build/outputs/jar/')
    include('classes.jar')
    rename('classes.jar', 'something-release.jar')
}
makeJar.dependsOn(clearJar, build)

iOS Max Memory Budget

    iPad1: 127MB/256MB/49% (crash amount/total amount/percentage of total)
    iPad2: 275MB/512MB/53%
    iPad3: 645MB/1024MB/62%
    iPad4: 585MB/1024MB/57% (iOS 8.1)
    iPad Mini 1st Generation: 297MB/512MB/58%
    iPad Mini retina: 696MB/1024MB/68% (iOS 7.1)
    iPad Air: 697MB/1024MB/68%
    iPad Air 2: 1195MB/2048MB/58%
    iPod touch 4th gen: 130MB/256MB/51% (iOS 6.1.1)
    iPod touch 5th gen: 286MB/512MB/56% (iOS 7.0)
    iPhone4: 325MB/512MB/63%
    iPhone5: 645MB/1024MB/62%
    iPhone5S: 646MB/1024MB/63%
    iPhone6: 645MB/1024MB/62%
    iPhone6+: 645MB/1024MB/62%
    iPhone6s: 1396MB/2048MB/68% (iOS 9.2)
    iPhone6s+: 1195MB/2048MB/58%