2012年3月15日 星期四
2012年3月14日 星期三
[OS X Lion] 修正localhost上DNS查詢緩慢 Fixing Slow DNS Queries in OS X Lion
使用OS X Lion上的Apache時, refresh page時常常會發現Apache怎麼那麼久回應
所以就在懷疑是不是因為Apache載太多模組了
查一下資料才知道原來OS X Lion會先遠端DNS Server查詢IPv6, 然後再返回本地找IPv4
所以解決方法就是把127.0.0.1的IPv6 IP加到 /etc/hosts
把以下這行加入 /etc/hosts
Reference:
http://clauswitt.com//fixing-slow-dns-queries-in-os-x-lion.html
所以就在懷疑是不是因為Apache載太多模組了
查一下資料才知道原來OS X Lion會先遠端DNS Server查詢IPv6, 然後再返回本地找IPv4
所以解決方法就是把127.0.0.1的IPv6 IP加到 /etc/hosts
把以下這行加入 /etc/hosts
fe80::1%lo0 domain.local就會發現速度變超快! 原來不是Apache的問題
Reference:
http://clauswitt.com//fixing-slow-dns-queries-in-os-x-lion.html
2012年3月1日 星期四
[iOS Dev] 開啓殭屍模式 找出EXC_BAD_ACCESS元兇
通常會出現EXC_BAD_ACCESS通常是哪個Object已經被release或是根本不存在
可以開啟Zombie Object來觀看到底是哪個Object不存在
1. ⌥ + ⌘ + R
2. 打勾Enable Zombie Objects
Reference:
http://stackoverflow.com/questions/2190227/how-do-i-setup-nszombieenabled-in-xcode-4
可以開啟Zombie Object來觀看到底是哪個Object不存在
1. ⌥ + ⌘ + R
2. 打勾Enable Zombie Objects
Reference:
http://stackoverflow.com/questions/2190227/how-do-i-setup-nszombieenabled-in-xcode-4
2012年2月24日 星期五
[iOS Dev] 不要套用UIBarStyleBlackTranslucent在NavigationBar上
今天用UIBarStyleBlackTranslucent在NavigationBar上, 發現整個top的位置會跑掉, 然後搜尋過後原來也有人遇到一樣的問題
Reference:
http://stackoverflow.com/questions/228319/navigation-controller-transparent-bar-style-is-not-working
2012年2月23日 星期四
[iOS Dev] 點擊狀態列捲軸往上問題 Tap statusbar scroll to top doesn't work
我有一個UITableView結果發現scroll到下面時
竟然無法點statusbar自動捲到最上面
後來發現是因為我的UITableViewCell裡有UIWebView, 所以action被搶走了
所以只要把UIWebView的scroll to top關掉, 就可以避免這個問題
Code (iOS5):
竟然無法點statusbar自動捲到最上面
後來發現是因為我的UITableViewCell裡有UIWebView, 所以action被搶走了
所以只要把UIWebView的scroll to top關掉, 就可以避免這個問題
Code (iOS5):
webView.scrollView.scrollsToTop = NO;
2012年2月17日 星期五
[iOS Dev] 更改UIKeyboard的底色為黑色
[inputTextView becomeFirstResponder];
[inputTextView setKeyboardAppearance:UIKeyboardAppearanceAlert];
原本的Default

更改keyboardAppearance 為 UIKeyboardAppearanceAlert

訂閱:
文章 (Atom)
