Posts Tagged ‘Xcode’

如何不讓Xcode自動加中括號?

Thursday, August 9th, 2012

繼上次在Xcode coding時會出現中括號一直對應失敗的問題後(i.e. [[instance method] ]; )。今天不知為何又出現了… 快被這個問題煩死。真的很無奈,重開了n次也沒用。最後終於找到了怎麼把這個該死的功能暫時拿掉。寫在這裡,避免以後又忘記… ~”~

如圖片,在上方工具列的 Xcode -> Preferences。”Balance brackets in Objective-C metohd calls” 那欄不要打勾,就不會再自動幫你加中括號了…. 唉… Xcode問題還真多…

MAC OS X上好用的熱鍵

Thursday, November 25th, 2010

最常用的(幾乎隨時都可用者)
command + C 複製
command + X 剪下 (但Finder下不適用)
command + V 貼上
command + A 全選
command + Z 復原
command + P 播放英文語音
command + W 關閉視窗
command + Q 結束應用程式
command + “+” 放大頁面
command + “–” 縮小頁面

系統
command + option + Esc 叫出強制結束應用程式列表
command +Tab 切換視窗
command + “,” 叫出目前程式的偏好設定

command + space : 切換輸入法
Ctrl + space : 叫出Spotlight
F9,F10,F11,F12 :這四個鍵基本到無須解釋

編輯
command + “方向鍵右鍵” 將Cursor移至行末
command + “方向鍵左鍵” 將Cursor移至行首
command + “方向鍵上鍵” 跳到文件頂端
command + “方向鍵下鍵” 跳到文件底端

截圖
command + shift + 3 抓螢幕(全螢幕)
command + shift + 4 抓螢幕(自訂區域)
command + shift + 4 + space 抓螢幕(出現一個照相機讓你決定視窗,有點類似Windows的Alt+PrintScreen)

Finder
command + N : 新增Finder視窗
command + “倒退鍵”
command + I 看檔案或目錄簡介
command +shift + N 新增目錄
command + option + M 將Finder全部最小化
command + option + W 關閉全部Finder

command + J : 設定顯示方式
command + shift + A 跳到應用程式
command + shift + U 跳到工具程式

DVD播放程式
space: 暫停與開始

command + “方向鍵右鍵” :向後快轉(每按一次切換快轉速度2x,4x,8x,16x,32x)
command + “方向鍵左鍵” :向前快轉
(快轉過程中按”Space”就可以恢復)

“方向鍵右鍵” 到下一節
“方向鍵左鍵” 到上一節

command + “方向鍵上鍵” 調整音量為更大聲
command + “方向鍵下鍵” 調整音量為更小聲

command + E 退片
command + 0 全螢幕切換

Safari
command + Ctrl + D 英英字典
command + T 開新Tab
command + W 關閉Tab

Firefox

command + T 開新Tab
command + W 關閉Tab

XCode
command + E 將選取的程式碼區塊重新排版
command + Ctrl + E 打開Project Setting視窗
command + Enter Build & Run

Fix “Code Sign error” error after update iOS

Saturday, October 16th, 2010

每次只要更新完iPhone的OS後,要從Xcode Run安裝測試程式在iPhone上都會出現Code Sign error的錯誤,真是不堪其擾。然後每次都會忘記要怎麼解決,花好多時間處理,真煩!! 在這裡寫成一篇教學避免每次都要查半天…

Every time after update iOS, it always show the DAMN “Code Sign error” message while building iPhone App project. It really annoys me! and always make me spent much time try to fix it. :twisted: So I write this tutorial to prevent me forget how to fix again…

Occurs the DAMN “Code Sign error” message

Step 1. select Project -> Edit Project Settings (or Hotkey: option + command + E)

Step 2. choose configuration (Remember set both Debug and Release version)

Step 3. choose “Code Sign Identity”

Step 4. Re-choose identity value

Then run again… You should not see the damn error again!! (Until next time you update your iPhone OS ~”~) Hope it’s helpful for you….. Orz

If it still can’t work properly, try the following extra steps to fix:

1. Right Click the Project (eg. x.xcodeproject) and select Show Package Content
2. Open project.pbxproj with textEdit
3. Search for all "CODE_SIGN_IDENTITY[sdk=iphonesos*]" and set it to "CODE_SIGN_IDENTITY[sdk=iphonesos*]" = "iPhone Developer";
4. Searach for "PROVISIONING_PROFILE[sdk=iphonesos*]" and set it to "PROVISIONING_PROFILE[sdk=iphonesos*]" = "";
5. Now Save the file
6. Now Reopen the xCode project or select "Read from Disk" resulting from xcode the prompt.
7. This Worked for me. i hope it works for you too

Good luck!!