http://www.muukii.me/blog/daily/815
こういう見えないクラスとの一致をSwiftでやる方法。
if "_UINavigationBarBackground" == NSStringFromClass(view.dynamicType) {
dynamicType
& NSStringFromClass
で文字列比較。。。
if [ -e *.xcworkspace ]; then | |
find *.xcworkspace | head -1 | xargs open | |
elif [ -e *.xcodeproj ]; then | |
find *.xcodeproj | head -1 | xargs open | |
fi |
cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk/System/Library/Frameworks | |
find . -name "*.h" | xargs egrep -o '[-+]\s+\([^/]*;' | egrep -o '[-+]\s+.*' | sort | uniq > method_defines.txt |
#!/bin/sh | |
if [ $# -lt 1 ]; then | |
echo "USAGE: xcode_action [action]" | |
echo "action:" | |
echo " build" | |
echo " run" | |
echo " clean" | |
echo " open FileName:row" | |
exit 1 |
marketVersion=`xcrun agvtool what-marketing-version | grep "^Found " | head -1 | gsed -e "s/.*\"\([.0-9]\+\)\".*/\1/"` | |
if [ ${CONFIGURATION} = "Release" ]; then | |
versionString="\"$marketVersion\"" | |
else | |
lastCommitDate=`xcrun git log -1 --format='%ci'` | |
versionString="\"$marketVersion ($lastCommitDate)\"" | |
fi | |
xcrun agvtool new-version "$versionString" |
if [ ${CONFIGURATION} = "Debug" ]; then | |
plistBuddy="/usr/libexec/PlistBuddy" | |
infoPlist=${TEMP_DIR}"/Preprocessed-Info.plist" | |
marketVersion=$($plistBuddy -c "Print CFBundleShortVersionString" $infoPlist) | |
versionPrefix="dev-" | |
lastCommitDate=`xcrun git log -1 --format='%ci'` | |
versionSuffix=" ($lastCommitDate)" |
tmux capture-pane -t 0 -S -32768; tmux show-buffer | vim - -c 32768 |
# autojump | |
function autojump-peco() { | |
local cd_history_path="~/.local/share/autojump/autojump.txt" | |
local SELECTED=$(eval more $cd_history_path | peco | cut -f2) | |
if [ 0 -ne ${#SELECTED} ]; then | |
eval echo "cd $SELECTED" | |
eval cd $SELECTED | |
fi | |
} | |
zle -N autojump-peco |
dict = { | |
ColorModel = RGB; | |
DPIHeight = 72; | |
DPIWidth = 72; | |
Depth = 8; | |
Orientation = 1; | |
PixelHeight = 2448; | |
PixelWidth = 3264; | |
"{Exif}" = { | |
ApertureValue = "2.275007124536905"; |
infix operator <<= { | |
associativity right | |
precedence 90 | |
assignment | |
} | |
infix operator %= { | |
associativity right | |
precedence 90 | |
assignment |
http://www.muukii.me/blog/daily/815
こういう見えないクラスとの一致をSwiftでやる方法。
if "_UINavigationBarBackground" == NSStringFromClass(view.dynamicType) {
dynamicType
& NSStringFromClass
で文字列比較。。。