文章挺详细的,收藏了:

原文地址:http://blog.csdn.net/jesseyoung/article/details/38922051