This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// From Apple official document | |
// https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/Multithreading/CreatingThreads/CreatingThreads.html#//apple_ref/doc/uid/10000057i-CH15-SW15 | |
- (void)threadMainRoutine | |
{ | |
BOOL moreWorkToDo = YES; | |
BOOL exitNow = NO; | |
NSRunLoop* runLoop = [NSRunLoop currentRunLoop]; | |
// Add the exitNow BOOL to the thread dictionary. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#获取当前版本Xcode的DVTPlugInCompatibilityUUID | |
UUID=$(defaults read /Applications/Xcode.app/Contents/Info DVTPlugInCompatibilityUUID) | |
echo Xcode DVTPlugInCompatibilityUUID is $UUID | |
#遍历每一个Xcode插件,将UUID写入插件的兼容列表中 | |
for MyPlugin in ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins/* | |
do | |
defaults write "$MyPlugin"/Contents/Info DVTPlugInCompatibilityUUIDs -array-add $UUID | |
echo write DVTPlugInCompatibilityUUID to $MyPlugin succeed! | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protocol ExampleProtocol { | |
var simpleDescription: String { get } | |
mutating func adjust() | |
} | |
enum SimpleEnum : String, ExampleProtocol { | |
case Before = "", After = " (whatever)" | |
var simpleDescription: String { | |
get { | |
return "A simple enum." + self.rawValue |