参考下面文章
http://blog.csdn.net/mimica247706624/article/details/75676253
http://www.cnblogs.com/diyishijian/p/6726792.html