此博客写的不错,可做参考: http://blog.csdn.net/Megustas_JJC/article/details/55046951 或者 http://blog.csdn.net/wzj0808/article/details/52267852