2012年3月28日 星期三
2012年3月15日 星期四
[iOS Dev] 實作Open in Safari
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
[[UIApplication sharedApplication] openURL:[NSURL URLWithString: @"http://www.apple.com"]]; |
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
訂閱:
文章 (Atom)