-
Notifications
You must be signed in to change notification settings - Fork 0
/
db.json
1 lines (1 loc) · 124 KB
/
db.json
1
{"Asset":[{"_id":"source/img/jj.png","path":"img/jj.png","modified":false},{"_id":"source/img/longmao.jpg","path":"img/longmao.jpg","modified":false},{"_id":"source/img/viewController.png","path":"img/viewController.png","modified":false},{"_id":"themes/yilia/source/img/coderwall.png","path":"img/coderwall.png","modified":false},{"_id":"themes/yilia/source/img/delicious.png","path":"img/delicious.png","modified":false},{"_id":"themes/yilia/source/img/facebook.png","path":"img/facebook.png","modified":false},{"_id":"themes/yilia/source/img/github.png","path":"img/github.png","modified":false},{"_id":"themes/yilia/source/img/google.png","path":"img/google.png","modified":false},{"_id":"themes/yilia/source/img/img-err.png","path":"img/img-err.png","modified":false},{"_id":"themes/yilia/source/img/img-loading.png","path":"img/img-loading.png","modified":false},{"_id":"themes/yilia/source/img/linkedin.png","path":"img/linkedin.png","modified":false},{"_id":"themes/yilia/source/img/pinboard.png","path":"img/pinboard.png","modified":false},{"_id":"themes/yilia/source/img/pinterest.png","path":"img/pinterest.png","modified":false},{"_id":"themes/yilia/source/img/rss.png","path":"img/rss.png","modified":false},{"_id":"themes/yilia/source/img/stackoverflow.png","path":"img/stackoverflow.png","modified":false},{"_id":"themes/yilia/source/img/twitter.png","path":"img/twitter.png","modified":false},{"_id":"themes/yilia/source/img/weibo.png","path":"img/weibo.png","modified":false},{"_id":"themes/yilia/source/js/instagram.js","path":"js/instagram.js","modified":false},{"_id":"themes/yilia/source/js/jquery.lazyload.js","path":"js/jquery.lazyload.js","modified":false},{"_id":"themes/yilia/source/js/main.js","path":"js/main.js","modified":false},{"_id":"themes/yilia/source/js/script.js","path":"js/script.js","modified":false},{"_id":"themes/yilia/source/css/style.styl","path":"css/style.styl","modified":false},{"_id":"themes/yilia/source/css/fonts/fontawesome-webfont.eot","path":"css/fonts/fontawesome-webfont.eot","modified":false},{"_id":"themes/yilia/source/css/fonts/fontawesome-webfont.svg","path":"css/fonts/fontawesome-webfont.svg","modified":false},{"_id":"themes/yilia/source/css/fonts/fontawesome-webfont.svgz","path":"css/fonts/fontawesome-webfont.svgz","modified":false},{"_id":"themes/yilia/source/css/fonts/fontawesome-webfont.ttf","path":"css/fonts/fontawesome-webfont.ttf","modified":false},{"_id":"themes/yilia/source/css/fonts/fontawesome-webfont.woff","path":"css/fonts/fontawesome-webfont.woff","modified":false},{"_id":"themes/yilia/source/fancybox/blank.gif","path":"fancybox/blank.gif","modified":false},{"_id":"themes/yilia/source/fancybox/fancybox_loading.gif","path":"fancybox/fancybox_loading.gif","modified":false},{"_id":"themes/yilia/source/fancybox/[email protected]","path":"fancybox/[email protected]","modified":false},{"_id":"themes/yilia/source/fancybox/fancybox_overlay.png","path":"fancybox/fancybox_overlay.png","modified":false},{"_id":"themes/yilia/source/fancybox/fancybox_sprite.png","path":"fancybox/fancybox_sprite.png","modified":false},{"_id":"themes/yilia/source/fancybox/[email protected]","path":"fancybox/[email protected]","modified":false},{"_id":"themes/yilia/source/fancybox/jquery.fancybox.css","path":"fancybox/jquery.fancybox.css","modified":false},{"_id":"themes/yilia/source/fancybox/jquery.fancybox.js","path":"fancybox/jquery.fancybox.js","modified":false},{"_id":"themes/yilia/source/fancybox/jquery.fancybox.pack.js","path":"fancybox/jquery.fancybox.pack.js","modified":false},{"_id":"themes/yilia/source/fancybox/helpers/fancybox_buttons.png","path":"fancybox/helpers/fancybox_buttons.png","modified":false},{"_id":"themes/yilia/source/fancybox/helpers/jquery.fancybox-buttons.js","path":"fancybox/helpers/jquery.fancybox-buttons.js","modified":false},{"_id":"themes/yilia/source/fancybox/helpers/jquery.fancybox-buttons.css","path":"fancybox/helpers/jquery.fancybox-buttons.css","modified":false},{"_id":"themes/yilia/source/fancybox/helpers/jquery.fancybox-media.js","path":"fancybox/helpers/jquery.fancybox-media.js","modified":false},{"_id":"themes/yilia/source/fancybox/helpers/jquery.fancybox-thumbs.css","path":"fancybox/helpers/jquery.fancybox-thumbs.css","modified":false},{"_id":"themes/yilia/source/fancybox/helpers/jquery.fancybox-thumbs.js","path":"fancybox/helpers/jquery.fancybox-thumbs.js","modified":false},{"_id":"themes/yilia/source/assets/blogImg/Thumbs.db","path":"assets/blogImg/Thumbs.db","modified":false},{"_id":"themes/yilia/source/assets/blogImg/border1px.jpg","path":"assets/blogImg/border1px.jpg","modified":false},{"_id":"themes/yilia/source/assets/blogImg/browser-history.jpg","path":"assets/blogImg/browser-history.jpg","modified":false},{"_id":"themes/yilia/source/assets/blogImg/browser-history2.jpg","path":"assets/blogImg/browser-history2.jpg","modified":false},{"_id":"themes/yilia/source/assets/blogImg/bys0.jpg","path":"assets/blogImg/bys0.jpg","modified":false},{"_id":"themes/yilia/source/assets/blogImg/bys1.jpg","path":"assets/blogImg/bys1.jpg","modified":false},{"_id":"themes/yilia/source/assets/blogImg/bys2.jpg","path":"assets/blogImg/bys2.jpg","modified":false},{"_id":"themes/yilia/source/assets/blogImg/bys3.jpg","path":"assets/blogImg/bys3.jpg","modified":false},{"_id":"themes/yilia/source/assets/blogImg/ckxt0.jpg","path":"assets/blogImg/ckxt0.jpg","modified":false},{"_id":"themes/yilia/source/assets/blogImg/ckxt1.jpg","path":"assets/blogImg/ckxt1.jpg","modified":false},{"_id":"themes/yilia/source/assets/blogImg/ckxt2.jpg","path":"assets/blogImg/ckxt2.jpg","modified":false},{"_id":"themes/yilia/source/assets/blogImg/ckxt3.jpg","path":"assets/blogImg/ckxt3.jpg","modified":false},{"_id":"themes/yilia/source/assets/blogImg/ckxt4.jpg","path":"assets/blogImg/ckxt4.jpg","modified":false},{"_id":"themes/yilia/source/assets/blogImg/css3_anm.jpg","path":"assets/blogImg/css3_anm.jpg","modified":false},{"_id":"themes/yilia/source/assets/blogImg/css_hack.jpg","path":"assets/blogImg/css_hack.jpg","modified":false},{"_id":"themes/yilia/source/assets/blogImg/immersion.png","path":"assets/blogImg/immersion.png","modified":false},{"_id":"themes/yilia/source/assets/blogImg/imp_search.jpg","path":"assets/blogImg/imp_search.jpg","modified":false},{"_id":"themes/yilia/source/assets/blogImg/instagram1.jpg","path":"assets/blogImg/instagram1.jpg","modified":false},{"_id":"themes/yilia/source/assets/blogImg/instagram2.jpg","path":"assets/blogImg/instagram2.jpg","modified":false},{"_id":"themes/yilia/source/assets/blogImg/jiugongge1.jpg","path":"assets/blogImg/jiugongge1.jpg","modified":false},{"_id":"themes/yilia/source/assets/blogImg/jiugongge10.jpg","path":"assets/blogImg/jiugongge10.jpg","modified":false},{"_id":"themes/yilia/source/assets/blogImg/jiugongge2.jpg","path":"assets/blogImg/jiugongge2.jpg","modified":false},{"_id":"themes/yilia/source/assets/blogImg/jiugongge3.jpg","path":"assets/blogImg/jiugongge3.jpg","modified":false},{"_id":"themes/yilia/source/assets/blogImg/jiugongge4.jpg","path":"assets/blogImg/jiugongge4.jpg","modified":false},{"_id":"themes/yilia/source/assets/blogImg/jiugongge5.jpg","path":"assets/blogImg/jiugongge5.jpg","modified":false},{"_id":"themes/yilia/source/assets/blogImg/jiugongge6.jpg","path":"assets/blogImg/jiugongge6.jpg","modified":false},{"_id":"themes/yilia/source/assets/blogImg/jiugongge7.jpg","path":"assets/blogImg/jiugongge7.jpg","modified":false},{"_id":"themes/yilia/source/assets/blogImg/jiugongge8.jpg","path":"assets/blogImg/jiugongge8.jpg","modified":false},{"_id":"themes/yilia/source/assets/blogImg/jiugongge9.jpg","path":"assets/blogImg/jiugongge9.jpg","modified":false},{"_id":"themes/yilia/source/assets/blogImg/lijiang.jpg","path":"assets/blogImg/lijiang.jpg","modified":false},{"_id":"themes/yilia/source/assets/blogImg/lock.jpg","path":"assets/blogImg/lock.jpg","modified":false},{"_id":"themes/yilia/source/assets/blogImg/mediator1.jpg","path":"assets/blogImg/mediator1.jpg","modified":false},{"_id":"themes/yilia/source/assets/blogImg/myReader0.jpg","path":"assets/blogImg/myReader0.jpg","modified":false},{"_id":"themes/yilia/source/assets/blogImg/rabbit.jpg","path":"assets/blogImg/rabbit.jpg","modified":false},{"_id":"themes/yilia/source/assets/blogImg/reduce-http.jpg","path":"assets/blogImg/reduce-http.jpg","modified":false},{"_id":"themes/yilia/source/assets/blogImg/safety_001.jpg","path":"assets/blogImg/safety_001.jpg","modified":false},{"_id":"themes/yilia/source/assets/blogImg/safety_002.jpg","path":"assets/blogImg/safety_002.jpg","modified":false},{"_id":"themes/yilia/source/assets/blogImg/safety_003.jpg","path":"assets/blogImg/safety_003.jpg","modified":false},{"_id":"themes/yilia/source/assets/blogImg/safety_004.jpg","path":"assets/blogImg/safety_004.jpg","modified":false},{"_id":"themes/yilia/source/assets/blogImg/safety_005.jpg","path":"assets/blogImg/safety_005.jpg","modified":false},{"_id":"themes/yilia/source/assets/blogImg/up1_tips.jpg","path":"assets/blogImg/up1_tips.jpg","modified":false},{"_id":"themes/yilia/source/assets/blogImg/volunteer1.jpg","path":"assets/blogImg/volunteer1.jpg","modified":false},{"_id":"themes/yilia/source/assets/blogImg/volunteer2.jpg","path":"assets/blogImg/volunteer2.jpg","modified":false},{"_id":"themes/yilia/source/assets/blogImg/volunteer3.jpg","path":"assets/blogImg/volunteer3.jpg","modified":false},{"_id":"themes/yilia/source/assets/blogImg/web_worker1.png","path":"assets/blogImg/web_worker1.png","modified":false},{"_id":"themes/yilia/source/assets/blogImg/web_worker2.png","path":"assets/blogImg/web_worker2.png","modified":false},{"_id":"themes/yilia/source/assets/blogImg/xmas_ico0.jpg","path":"assets/blogImg/xmas_ico0.jpg","modified":false},{"_id":"themes/yilia/source/assets/blogImg/xmas_ico1.jpg","path":"assets/blogImg/xmas_ico1.jpg","modified":false},{"_id":"themes/yilia/source/assets/blogImg/xmas_ico2.jpg","path":"assets/blogImg/xmas_ico2.jpg","modified":false},{"_id":"themes/yilia/source/assets/blogImg/xmas_ico3.jpg","path":"assets/blogImg/xmas_ico3.jpg","modified":false},{"_id":"themes/yilia/source/assets/demo/border1px.html","path":"assets/demo/border1px.html","modified":false},{"_id":"themes/yilia/source/assets/demo/hack_demo.html","path":"assets/demo/hack_demo.html","modified":false},{"_id":"themes/yilia/source/assets/demo/jiugongge_demo.html","path":"assets/demo/jiugongge_demo.html","modified":false},{"_id":"themes/yilia/source/assets/demo/jiugongge_demo2.html","path":"assets/demo/jiugongge_demo2.html","modified":false},{"_id":"themes/yilia/source/assets/demo/jquery.js","path":"assets/demo/jquery.js","modified":false},{"_id":"themes/yilia/source/assets/demo/coffee_pc_demo/pro-con.html","path":"assets/demo/coffee_pc_demo/pro-con.html","modified":false},{"_id":"themes/yilia/source/assets/demo/coffee_pc_demo/pro-con.js","path":"assets/demo/coffee_pc_demo/pro-con.js","modified":false},{"_id":"themes/yilia/source/assets/demo/mediator/demo.html","path":"assets/demo/mediator/demo.html","modified":false},{"_id":"themes/yilia/source/assets/demo/mediator/mediator.js","path":"assets/demo/mediator/mediator.js","modified":false},{"_id":"themes/yilia/source/assets/demo/mediator/sgws.jpg","path":"assets/demo/mediator/sgws.jpg","modified":false},{"_id":"themes/yilia/source/assets/demo/pre_css3_demo/Thumbs.db","path":"assets/demo/pre_css3_demo/Thumbs.db","modified":false},{"_id":"themes/yilia/source/assets/demo/pre_css3_demo/demo.html","path":"assets/demo/pre_css3_demo/demo.html","modified":false},{"_id":"themes/yilia/source/assets/demo/pre_css3_demo/bg.jpg","path":"assets/demo/pre_css3_demo/bg.jpg","modified":false},{"_id":"themes/yilia/source/assets/demo/pre_css3_demo/mhxy.png","path":"assets/demo/pre_css3_demo/mhxy.png","modified":false},{"_id":"themes/yilia/source/assets/demo/gift/index.html","path":"assets/demo/gift/index.html","modified":false},{"_id":"themes/yilia/source/assets/demo/gift/img/paper-b.jpg","path":"assets/demo/gift/img/paper-b.jpg","modified":false},{"_id":"themes/yilia/source/assets/demo/gift/img/paper.jpg","path":"assets/demo/gift/img/paper.jpg","modified":false},{"_id":"themes/yilia/source/assets/demo/gift/img/shake.png","path":"assets/demo/gift/img/shake.png","modified":false},{"_id":"themes/yilia/source/assets/demo/gift/js/index.main.js","path":"assets/demo/gift/js/index.main.js","modified":false},{"_id":"themes/yilia/source/assets/demo/gift/js/shake.js","path":"assets/demo/gift/js/shake.js","modified":false},{"_id":"themes/yilia/source/assets/demo/gift/js/zepto.min.js","path":"assets/demo/gift/js/zepto.min.js","modified":false},{"_id":"themes/yilia/source/assets/demo/gift/css/index.css","path":"assets/demo/gift/css/index.css","modified":false},{"_id":"themes/yilia/source/assets/demo/gift/css/index.scss","path":"assets/demo/gift/css/index.scss","modified":false},{"_id":"themes/yilia/source/assets/demo/gift/css/reset.css","path":"assets/demo/gift/css/reset.css","modified":false},{"_id":"themes/yilia/source/assets/demo/gift/media/gift.ogg","path":"assets/demo/gift/media/gift.ogg","modified":false},{"_id":"themes/yilia/source/assets/demo/my_news_reader/index.html","path":"assets/demo/my_news_reader/index.html","modified":false},{"_id":"themes/yilia/source/assets/demo/my_news_reader/js/main.js","path":"assets/demo/my_news_reader/js/main.js","modified":false},{"_id":"themes/yilia/source/assets/demo/my_news_reader/js/tagConfig.js","path":"assets/demo/my_news_reader/js/tagConfig.js","modified":false}],"Cache":[{"_id":"scaffolds\\draft.md","mtime":1420703797000},{"_id":"scaffolds\\page.md","mtime":1420703797000},{"_id":"scaffolds\\photo.md","mtime":1420703797000},{"_id":"scaffolds\\post.md","mtime":1420703797000},{"_id":"source\\_posts\\hello-world.md","mtime":1420703797000},{"_id":"themes\\landscape\\Gruntfile.js","mtime":1420703797000},{"_id":"themes\\landscape\\_config.yml","mtime":1420703797000},{"_id":"themes\\landscape\\README.md","mtime":1420703797000},{"_id":"themes\\landscape\\LICENSE","mtime":1420703797000},{"_id":"themes\\landscape\\package.json","mtime":1420703797000},{"_id":"themes\\landscape\\scripts\\fancybox.js","mtime":1420703797000},{"_id":"themes\\landscape\\layout\\archive.ejs","mtime":1420703797000},{"_id":"themes\\landscape\\layout\\category.ejs","mtime":1420703797000},{"_id":"themes\\landscape\\layout\\layout.ejs","mtime":1420703797000},{"_id":"themes\\landscape\\layout\\index.ejs","mtime":1420703797000},{"_id":"themes\\landscape\\layout\\page.ejs","mtime":1420703797000},{"_id":"themes\\landscape\\layout\\post.ejs","mtime":1420703797000},{"_id":"themes\\landscape\\layout\\tag.ejs","mtime":1420703797000},{"_id":"themes\\landscape\\layout\\_widget\\category.ejs","mtime":1420703797000},{"_id":"themes\\landscape\\layout\\_widget\\archive.ejs","mtime":1420703797000},{"_id":"themes\\landscape\\layout\\_widget\\tag.ejs","mtime":1420703797000},{"_id":"themes\\landscape\\layout\\_widget\\recent_posts.ejs","mtime":1420703797000},{"_id":"themes\\landscape\\layout\\_widget\\tagcloud.ejs","mtime":1420703797000},{"_id":"themes\\landscape\\layout\\_partial\\after-footer.ejs","mtime":1420703797000},{"_id":"themes\\landscape\\layout\\_partial\\archive.ejs","mtime":1420703797000},{"_id":"themes\\landscape\\layout\\_partial\\article.ejs","mtime":1420703797000},{"_id":"themes\\landscape\\layout\\_partial\\archive-post.ejs","mtime":1420703797000},{"_id":"themes\\landscape\\layout\\_partial\\footer.ejs","mtime":1420703797000},{"_id":"themes\\landscape\\layout\\_partial\\google-analytics.ejs","mtime":1420703797000},{"_id":"themes\\landscape\\layout\\_partial\\head.ejs","mtime":1420703797000},{"_id":"themes\\landscape\\layout\\_partial\\header.ejs","mtime":1420703797000},{"_id":"themes\\landscape\\layout\\_partial\\mobile-nav.ejs","mtime":1420703797000},{"_id":"themes\\landscape\\layout\\_partial\\sidebar.ejs","mtime":1420703797000},{"_id":"themes\\landscape\\layout\\_partial\\post\\category.ejs","mtime":1420703797000},{"_id":"themes\\landscape\\layout\\_partial\\post\\nav.ejs","mtime":1420703797000},{"_id":"themes\\landscape\\layout\\_partial\\post\\date.ejs","mtime":1420703797000},{"_id":"themes\\landscape\\layout\\_partial\\post\\gallery.ejs","mtime":1420703797000},{"_id":"themes\\landscape\\layout\\_partial\\post\\tag.ejs","mtime":1420703797000},{"_id":"themes\\landscape\\layout\\_partial\\post\\title.ejs","mtime":1420703797000},{"_id":"themes\\landscape\\source\\js\\script.js","mtime":1420703797000},{"_id":"themes\\landscape\\source\\css\\_extend.styl","mtime":1420703797000},{"_id":"themes\\landscape\\source\\css\\_variables.styl","mtime":1420703797000},{"_id":"themes\\landscape\\source\\css\\style.styl","mtime":1420703797000},{"_id":"themes\\landscape\\source\\css\\_util\\grid.styl","mtime":1420703797000},{"_id":"themes\\landscape\\source\\css\\_util\\mixin.styl","mtime":1420703797000},{"_id":"themes\\landscape\\source\\css\\_partial\\archive.styl","mtime":1420703797000},{"_id":"themes\\landscape\\source\\css\\_partial\\article.styl","mtime":1420703797000},{"_id":"themes\\landscape\\source\\css\\_partial\\footer.styl","mtime":1420703797000},{"_id":"themes\\landscape\\source\\css\\_partial\\comment.styl","mtime":1420703797000},{"_id":"themes\\landscape\\source\\css\\_partial\\header.styl","mtime":1420703797000},{"_id":"themes\\landscape\\source\\css\\_partial\\highlight.styl","mtime":1420703797000},{"_id":"themes\\landscape\\source\\css\\_partial\\mobile.styl","mtime":1420703797000},{"_id":"themes\\landscape\\source\\css\\_partial\\sidebar-aside.styl","mtime":1420703797000},{"_id":"themes\\landscape\\source\\css\\_partial\\sidebar-bottom.styl","mtime":1420703797000},{"_id":"themes\\landscape\\source\\css\\_partial\\sidebar.styl","mtime":1420703797000},{"_id":"themes\\landscape\\source\\css\\fonts\\FontAwesome.otf","mtime":1420703797000},{"_id":"themes\\landscape\\source\\css\\fonts\\fontawesome-webfont.eot","mtime":1420703797000},{"_id":"themes\\landscape\\source\\css\\fonts\\fontawesome-webfont.svg","mtime":1420703797000},{"_id":"themes\\landscape\\source\\css\\fonts\\fontawesome-webfont.ttf","mtime":1420703797000},{"_id":"themes\\landscape\\source\\css\\fonts\\fontawesome-webfont.woff","mtime":1420703797000},{"_id":"themes\\landscape\\source\\css\\images\\banner.jpg","mtime":1420703797000},{"_id":"themes\\landscape\\source\\fancybox\\blank.gif","mtime":1420703797000},{"_id":"themes\\landscape\\source\\fancybox\\fancybox_loading.gif","mtime":1420703797000},{"_id":"themes\\landscape\\source\\fancybox\\fancybox_overlay.png","mtime":1420703797000},{"_id":"themes\\landscape\\source\\fancybox\\[email protected]","mtime":1420703797000},{"_id":"themes\\landscape\\source\\fancybox\\fancybox_sprite.png","mtime":1420703797000},{"_id":"themes\\landscape\\source\\fancybox\\[email protected]","mtime":1420703797000},{"_id":"themes\\landscape\\source\\fancybox\\jquery.fancybox.css","mtime":1420703797000},{"_id":"themes\\landscape\\source\\fancybox\\jquery.fancybox.js","mtime":1420703797000},{"_id":"themes\\landscape\\source\\fancybox\\jquery.fancybox.pack.js","mtime":1420703797000},{"_id":"themes\\landscape\\source\\fancybox\\helpers\\fancybox_buttons.png","mtime":1420703797000},{"_id":"themes\\landscape\\source\\fancybox\\helpers\\jquery.fancybox-buttons.css","mtime":1420703797000},{"_id":"themes\\landscape\\source\\fancybox\\helpers\\jquery.fancybox-buttons.js","mtime":1420703797000},{"_id":"themes\\landscape\\source\\fancybox\\helpers\\jquery.fancybox-media.js","mtime":1420703797000},{"_id":"themes\\landscape\\source\\fancybox\\helpers\\jquery.fancybox-thumbs.css","mtime":1420703797000},{"_id":"themes\\landscape\\source\\fancybox\\helpers\\jquery.fancybox-thumbs.js","mtime":1420703797000},{"_id":"themes\\landscape-plus\\Gruntfile.js","mtime":1420710203000},{"_id":"themes\\landscape-plus\\LICENSE","mtime":1420710203000},{"_id":"themes\\landscape-plus\\_config.yml","mtime":1420710203000},{"_id":"themes\\landscape-plus\\README.md","mtime":1420710203000},{"_id":"themes\\landscape-plus\\package.json","mtime":1420710203000},{"_id":"themes\\landscape-plus\\languages\\default.yml","mtime":1420710203000},{"_id":"themes\\landscape-plus\\languages\\zh-TW.yml","mtime":1420710203000},{"_id":"themes\\landscape-plus\\languages\\zh-CN.yml","mtime":1420710203000},{"_id":"themes\\landscape-plus\\scripts\\fancybox.js","mtime":1420710203000},{"_id":"themes\\landscape-plus\\layout\\archive.ejs","mtime":1420710203000},{"_id":"themes\\landscape-plus\\layout\\category.ejs","mtime":1420710203000},{"_id":"themes\\landscape-plus\\layout\\index.ejs","mtime":1420710203000},{"_id":"themes\\landscape-plus\\layout\\layout.ejs","mtime":1420710203000},{"_id":"themes\\landscape-plus\\layout\\page.ejs","mtime":1420710203000},{"_id":"themes\\landscape-plus\\layout\\post.ejs","mtime":1420710203000},{"_id":"themes\\landscape-plus\\layout\\tag.ejs","mtime":1420710203000},{"_id":"themes\\landscape-plus\\layout\\_widget\\archive.ejs","mtime":1420710203000},{"_id":"themes\\landscape-plus\\layout\\_widget\\category.ejs","mtime":1420710203000},{"_id":"themes\\landscape-plus\\layout\\_widget\\recent_posts.ejs","mtime":1420710203000},{"_id":"themes\\landscape-plus\\layout\\_widget\\links.ejs","mtime":1420710203000},{"_id":"themes\\landscape-plus\\layout\\_widget\\tag.ejs","mtime":1420710203000},{"_id":"themes\\landscape-plus\\layout\\_widget\\tagcloud.ejs","mtime":1420710203000},{"_id":"themes\\landscape-plus\\layout\\_partial\\after-footer.ejs","mtime":1420710203000},{"_id":"themes\\landscape-plus\\layout\\_partial\\archive-post.ejs","mtime":1420710203000},{"_id":"themes\\landscape-plus\\layout\\_partial\\archive.ejs","mtime":1420710203000},{"_id":"themes\\landscape-plus\\layout\\_partial\\article.ejs","mtime":1420710203000},{"_id":"themes\\landscape-plus\\layout\\_partial\\footer.ejs","mtime":1420710203000},{"_id":"themes\\landscape-plus\\layout\\_partial\\head.ejs","mtime":1420710203000},{"_id":"themes\\landscape-plus\\layout\\_partial\\google-analytics.ejs","mtime":1420710203000},{"_id":"themes\\landscape-plus\\layout\\_partial\\header.ejs","mtime":1420710203000},{"_id":"themes\\landscape-plus\\layout\\_partial\\mathjax.ejs","mtime":1420710203000},{"_id":"themes\\landscape-plus\\layout\\_partial\\mobile-nav.ejs","mtime":1420710203000},{"_id":"themes\\landscape-plus\\layout\\_partial\\sidebar.ejs","mtime":1420710203000},{"_id":"themes\\landscape-plus\\layout\\_partial\\totop.ejs","mtime":1420710203000},{"_id":"themes\\landscape-plus\\layout\\_partial\\post\\category.ejs","mtime":1420710203000},{"_id":"themes\\landscape-plus\\layout\\_partial\\post\\date.ejs","mtime":1420710203000},{"_id":"themes\\landscape-plus\\layout\\_partial\\post\\gallery.ejs","mtime":1420710203000},{"_id":"themes\\landscape-plus\\layout\\_partial\\post\\nav.ejs","mtime":1420710203000},{"_id":"themes\\landscape-plus\\layout\\_partial\\post\\tag.ejs","mtime":1420710203000},{"_id":"themes\\landscape-plus\\layout\\_partial\\post\\title.ejs","mtime":1420710203000},{"_id":"themes\\landscape-plus\\source\\img\\scrollup.png","mtime":1420710203000},{"_id":"themes\\landscape-plus\\source\\js\\script.js","mtime":1420710203000},{"_id":"themes\\landscape-plus\\source\\fancybox\\blank.gif","mtime":1420710203000},{"_id":"themes\\landscape-plus\\source\\fancybox\\fancybox_loading.gif","mtime":1420710203000},{"_id":"themes\\landscape-plus\\source\\fancybox\\[email protected]","mtime":1420710203000},{"_id":"themes\\landscape-plus\\source\\fancybox\\fancybox_overlay.png","mtime":1420710203000},{"_id":"themes\\landscape-plus\\source\\fancybox\\fancybox_sprite.png","mtime":1420710203000},{"_id":"themes\\landscape-plus\\source\\fancybox\\[email protected]","mtime":1420710203000},{"_id":"themes\\landscape-plus\\source\\fancybox\\jquery.fancybox.css","mtime":1420710203000},{"_id":"themes\\landscape-plus\\source\\fancybox\\jquery.fancybox.js","mtime":1420710203000},{"_id":"themes\\landscape-plus\\source\\fancybox\\helpers\\fancybox_buttons.png","mtime":1420710203000},{"_id":"themes\\landscape-plus\\source\\fancybox\\jquery.fancybox.pack.js","mtime":1420710203000},{"_id":"themes\\landscape-plus\\source\\fancybox\\helpers\\jquery.fancybox-buttons.css","mtime":1420710203000},{"_id":"themes\\landscape-plus\\source\\fancybox\\helpers\\jquery.fancybox-buttons.js","mtime":1420710203000},{"_id":"themes\\landscape-plus\\source\\fancybox\\helpers\\jquery.fancybox-media.js","mtime":1420710203000},{"_id":"themes\\landscape-plus\\source\\fancybox\\helpers\\jquery.fancybox-thumbs.css","mtime":1420710203000},{"_id":"themes\\landscape-plus\\source\\fancybox\\helpers\\jquery.fancybox-thumbs.js","mtime":1420710203000},{"_id":"themes\\landscape-plus\\source\\css\\_extend.styl","mtime":1420710203000},{"_id":"themes\\landscape-plus\\source\\css\\_variables.styl","mtime":1420710203000},{"_id":"themes\\landscape-plus\\source\\css\\style.styl","mtime":1420710203000},{"_id":"themes\\landscape-plus\\source\\css\\_partial\\archive.styl","mtime":1420710203000},{"_id":"themes\\landscape-plus\\source\\css\\_partial\\article.styl","mtime":1420710203000},{"_id":"themes\\landscape-plus\\source\\css\\_partial\\comment.styl","mtime":1420710203000},{"_id":"themes\\landscape-plus\\source\\css\\_partial\\footer.styl","mtime":1420710203000},{"_id":"themes\\landscape-plus\\source\\css\\_partial\\header.styl","mtime":1420710203000},{"_id":"themes\\landscape-plus\\source\\css\\_partial\\highlight.styl","mtime":1420710203000},{"_id":"themes\\landscape-plus\\source\\css\\_partial\\mobile.styl","mtime":1420710203000},{"_id":"themes\\landscape-plus\\source\\css\\_partial\\sidebar-aside.styl","mtime":1420710203000},{"_id":"themes\\landscape-plus\\source\\css\\_partial\\sidebar-bottom.styl","mtime":1420710203000},{"_id":"themes\\landscape-plus\\source\\css\\_partial\\totop.styl","mtime":1420710203000},{"_id":"themes\\landscape-plus\\source\\css\\_util\\grid.styl","mtime":1420710203000},{"_id":"themes\\landscape-plus\\source\\css\\_partial\\sidebar.styl","mtime":1420710203000},{"_id":"themes\\landscape-plus\\source\\css\\_util\\mixin.styl","mtime":1420710203000},{"_id":"themes\\landscape-plus\\source\\css\\fonts\\FontAwesome.otf","mtime":1420710203000},{"_id":"themes\\landscape-plus\\source\\css\\fonts\\fontawesome-webfont.eot","mtime":1420710203000},{"_id":"themes\\landscape-plus\\source\\css\\fonts\\fontawesome-webfont.svg","mtime":1420710203000},{"_id":"themes\\landscape-plus\\source\\css\\fonts\\fontawesome-webfont.ttf","mtime":1420710203000},{"_id":"themes\\landscape-plus\\source\\css\\fonts\\fontawesome-webfont.woff","mtime":1420710203000},{"_id":"themes\\landscape-plus\\source\\css\\images\\banner.jpg","mtime":1420710203000},{"_id":"themes\\yilia\\README.md","mtime":1420711300000},{"_id":"themes\\yilia\\_config.yml","mtime":1420716476000},{"_id":"themes\\yilia\\package.json","mtime":1420711300000},{"_id":"themes\\yilia\\scripts\\fancybox.js","mtime":1420711300000},{"_id":"themes\\yilia\\layout\\archive.ejs","mtime":1420711300000},{"_id":"themes\\yilia\\layout\\category.ejs","mtime":1420711300000},{"_id":"themes\\yilia\\layout\\index.ejs","mtime":1420711300000},{"_id":"themes\\yilia\\layout\\layout.ejs","mtime":1420711300000},{"_id":"themes\\yilia\\layout\\page.ejs","mtime":1420711300000},{"_id":"themes\\yilia\\layout\\post.ejs","mtime":1420711300000},{"_id":"themes\\yilia\\layout\\tag.ejs","mtime":1420711300000},{"_id":"themes\\yilia\\layout\\_partial\\after-footer.ejs","mtime":1420711300000},{"_id":"themes\\yilia\\layout\\_partial\\archive.ejs","mtime":1420711300000},{"_id":"themes\\yilia\\layout\\_partial\\archive-post.ejs","mtime":1420711300000},{"_id":"themes\\yilia\\layout\\_partial\\article.ejs","mtime":1420711300000},{"_id":"themes\\yilia\\layout\\_partial\\footer.ejs","mtime":1420711300000},{"_id":"themes\\yilia\\layout\\_partial\\head.ejs","mtime":1420711300000},{"_id":"themes\\yilia\\layout\\_partial\\google-analytics.ejs","mtime":1420711300000},{"_id":"themes\\yilia\\layout\\_partial\\header.ejs","mtime":1420711300000},{"_id":"themes\\yilia\\layout\\_partial\\left-col.ejs","mtime":1420711300000},{"_id":"themes\\yilia\\layout\\_partial\\mobile-nav.ejs","mtime":1420711300000},{"_id":"themes\\yilia\\layout\\_partial\\post\\category.ejs","mtime":1420711300000},{"_id":"themes\\yilia\\layout\\_partial\\post\\date.ejs","mtime":1420711300000},{"_id":"themes\\yilia\\layout\\_partial\\post\\nav.ejs","mtime":1420711300000},{"_id":"themes\\yilia\\layout\\_partial\\post\\share.ejs","mtime":1420711300000},{"_id":"themes\\yilia\\layout\\_partial\\post\\tag.ejs","mtime":1420711300000},{"_id":"themes\\yilia\\layout\\_partial\\post\\duoshuo.ejs","mtime":1420711300000},{"_id":"themes\\yilia\\layout\\_partial\\post\\title.ejs","mtime":1420711300000},{"_id":"themes\\yilia\\source\\img\\delicious.png","mtime":1420711300000},{"_id":"themes\\yilia\\source\\img\\coderwall.png","mtime":1420711300000},{"_id":"themes\\yilia\\source\\img\\facebook.png","mtime":1420711300000},{"_id":"themes\\yilia\\source\\img\\github.png","mtime":1420711300000},{"_id":"themes\\yilia\\source\\img\\google.png","mtime":1420711300000},{"_id":"themes\\yilia\\source\\img\\img-err.png","mtime":1420711300000},{"_id":"themes\\yilia\\source\\img\\img-loading.png","mtime":1420711300000},{"_id":"themes\\yilia\\source\\img\\linkedin.png","mtime":1420711300000},{"_id":"themes\\yilia\\source\\img\\pinboard.png","mtime":1420711300000},{"_id":"themes\\yilia\\source\\img\\pinterest.png","mtime":1420711300000},{"_id":"themes\\yilia\\source\\img\\rss.png","mtime":1420711300000},{"_id":"themes\\yilia\\source\\img\\stackoverflow.png","mtime":1420711300000},{"_id":"themes\\yilia\\source\\img\\twitter.png","mtime":1420711300000},{"_id":"themes\\yilia\\source\\img\\weibo.png","mtime":1420711300000},{"_id":"themes\\yilia\\source\\js\\instagram.js","mtime":1420711300000},{"_id":"themes\\yilia\\source\\js\\jquery.lazyload.js","mtime":1420711300000},{"_id":"themes\\yilia\\source\\js\\main.js","mtime":1420711300000},{"_id":"themes\\yilia\\source\\js\\script.js","mtime":1420711300000},{"_id":"themes\\yilia\\source\\css\\_extend.styl","mtime":1420711300000},{"_id":"themes\\yilia\\source\\css\\_variables.styl","mtime":1420711300000},{"_id":"themes\\yilia\\source\\css\\style.styl","mtime":1420711300000},{"_id":"themes\\yilia\\source\\css\\_partial\\archive.styl","mtime":1420711300000},{"_id":"themes\\yilia\\source\\css\\_partial\\article.styl","mtime":1420711300000},{"_id":"themes\\yilia\\source\\css\\_partial\\footer.styl","mtime":1420711300000},{"_id":"themes\\yilia\\source\\css\\_partial\\header.styl","mtime":1420711300000},{"_id":"themes\\yilia\\source\\css\\_partial\\highlight.styl","mtime":1420711300000},{"_id":"themes\\yilia\\source\\css\\_partial\\instagram.styl","mtime":1420711300000},{"_id":"themes\\yilia\\source\\css\\_partial\\main.styl","mtime":1420711300000},{"_id":"themes\\yilia\\source\\css\\_partial\\mobile.styl","mtime":1420711300000},{"_id":"themes\\yilia\\source\\css\\_partial\\page.styl","mtime":1420711300000},{"_id":"themes\\yilia\\source\\css\\_partial\\share.styl","mtime":1420711300000},{"_id":"themes\\yilia\\source\\css\\_partial\\tagcloud.styl","mtime":1420711300000},{"_id":"themes\\yilia\\source\\css\\_util\\mixin.styl","mtime":1420711300000},{"_id":"themes\\yilia\\source\\css\\_util\\grid.styl","mtime":1420711300000},{"_id":"themes\\yilia\\source\\css\\fonts\\fontawesome-webfont.eot","mtime":1420711300000},{"_id":"themes\\yilia\\source\\css\\fonts\\fontawesome-webfont.svg","mtime":1420711300000},{"_id":"themes\\yilia\\source\\css\\fonts\\fontawesome-webfont.ttf","mtime":1420711300000},{"_id":"themes\\yilia\\source\\css\\fonts\\fontawesome-webfont.svgz","mtime":1420711300000},{"_id":"themes\\yilia\\source\\css\\fonts\\fontawesome-webfont.woff","mtime":1420711300000},{"_id":"themes\\yilia\\source\\fancybox\\blank.gif","mtime":1420711300000},{"_id":"themes\\yilia\\source\\fancybox\\fancybox_loading.gif","mtime":1420711300000},{"_id":"themes\\yilia\\source\\fancybox\\[email protected]","mtime":1420711300000},{"_id":"themes\\yilia\\source\\fancybox\\fancybox_overlay.png","mtime":1420711300000},{"_id":"themes\\yilia\\source\\fancybox\\[email protected]","mtime":1420711300000},{"_id":"themes\\yilia\\source\\fancybox\\fancybox_sprite.png","mtime":1420711300000},{"_id":"themes\\yilia\\source\\fancybox\\jquery.fancybox.css","mtime":1420711300000},{"_id":"themes\\yilia\\source\\fancybox\\jquery.fancybox.js","mtime":1420711300000},{"_id":"themes\\yilia\\source\\fancybox\\jquery.fancybox.pack.js","mtime":1420711300000},{"_id":"themes\\yilia\\source\\fancybox\\helpers\\fancybox_buttons.png","mtime":1420711300000},{"_id":"themes\\yilia\\source\\fancybox\\helpers\\jquery.fancybox-buttons.js","mtime":1420711300000},{"_id":"themes\\yilia\\source\\fancybox\\helpers\\jquery.fancybox-buttons.css","mtime":1420711300000},{"_id":"themes\\yilia\\source\\fancybox\\helpers\\jquery.fancybox-media.js","mtime":1420711300000},{"_id":"themes\\yilia\\source\\fancybox\\helpers\\jquery.fancybox-thumbs.css","mtime":1420711300000},{"_id":"themes\\yilia\\source\\fancybox\\helpers\\jquery.fancybox-thumbs.js","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\blogImg\\Thumbs.db","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\blogImg\\browser-history.jpg","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\blogImg\\browser-history2.jpg","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\blogImg\\bys0.jpg","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\blogImg\\bys1.jpg","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\blogImg\\bys2.jpg","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\blogImg\\border1px.jpg","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\blogImg\\bys3.jpg","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\blogImg\\ckxt0.jpg","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\blogImg\\ckxt1.jpg","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\blogImg\\ckxt2.jpg","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\blogImg\\ckxt3.jpg","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\blogImg\\ckxt4.jpg","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\blogImg\\css3_anm.jpg","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\blogImg\\css_hack.jpg","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\blogImg\\immersion.png","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\blogImg\\imp_search.jpg","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\blogImg\\instagram1.jpg","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\blogImg\\instagram2.jpg","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\blogImg\\jiugongge1.jpg","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\blogImg\\jiugongge10.jpg","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\blogImg\\jiugongge2.jpg","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\blogImg\\jiugongge3.jpg","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\blogImg\\jiugongge4.jpg","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\blogImg\\jiugongge5.jpg","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\blogImg\\jiugongge6.jpg","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\blogImg\\jiugongge7.jpg","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\blogImg\\jiugongge8.jpg","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\blogImg\\jiugongge9.jpg","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\blogImg\\lijiang.jpg","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\blogImg\\lock.jpg","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\blogImg\\mediator1.jpg","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\blogImg\\myReader0.jpg","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\blogImg\\rabbit.jpg","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\blogImg\\reduce-http.jpg","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\blogImg\\safety_001.jpg","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\blogImg\\safety_002.jpg","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\blogImg\\safety_003.jpg","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\blogImg\\safety_004.jpg","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\blogImg\\safety_005.jpg","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\blogImg\\up1_tips.jpg","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\blogImg\\volunteer1.jpg","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\blogImg\\volunteer2.jpg","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\blogImg\\volunteer3.jpg","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\blogImg\\web_worker1.png","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\blogImg\\web_worker2.png","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\blogImg\\xmas_ico0.jpg","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\blogImg\\xmas_ico1.jpg","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\blogImg\\xmas_ico2.jpg","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\blogImg\\xmas_ico3.jpg","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\demo\\border1px.html","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\demo\\hack_demo.html","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\demo\\jiugongge_demo.html","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\demo\\jiugongge_demo2.html","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\demo\\jquery.js","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\demo\\coffee_pc_demo\\pro-con.html","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\demo\\coffee_pc_demo\\pro-con.js","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\demo\\mediator\\demo.html","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\demo\\mediator\\mediator.js","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\demo\\mediator\\sgws.jpg","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\demo\\pre_css3_demo\\Thumbs.db","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\demo\\pre_css3_demo\\bg.jpg","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\demo\\pre_css3_demo\\demo.html","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\demo\\pre_css3_demo\\mhxy.png","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\demo\\gift\\index.html","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\demo\\gift\\css\\index.css","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\demo\\gift\\css\\index.scss","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\demo\\gift\\css\\reset.css","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\demo\\gift\\img\\paper-b.jpg","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\demo\\gift\\img\\paper.jpg","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\demo\\gift\\img\\shake.png","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\demo\\gift\\js\\zepto.min.js","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\demo\\gift\\js\\shake.js","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\demo\\gift\\js\\index.main.js","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\demo\\gift\\media\\gift.ogg","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\demo\\my_news_reader\\index.html","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\demo\\my_news_reader\\js\\main.js","mtime":1420711300000},{"_id":"themes\\yilia\\source\\assets\\demo\\my_news_reader\\js\\tagConfig.js","mtime":1420711300000},{"_id":"source\\_posts\\View-Program.md","mtime":1420778109000},{"_id":"source\\img\\longmao.jpg","mtime":1420713367000},{"_id":"source\\img\\jj.png","mtime":1420716747000},{"_id":"source\\404.html","mtime":1420717226000},{"_id":"source\\_posts\\hexo搭建博客.md","mtime":1420771576000},{"_id":"source\\_posts\\View-Controller.md","mtime":1420800395000},{"_id":"scaffolds/draft.md","mtime":1475329037000},{"_id":"scaffolds/page.md","mtime":1475329037000},{"_id":"scaffolds/photo.md","mtime":1475329037000},{"_id":"scaffolds/post.md","mtime":1475329037000},{"_id":"source/404.html","mtime":1475329037000},{"_id":"source/_posts/View-Controller.md","mtime":1475329037000},{"_id":"source/_posts/View-Program.md","mtime":1475329037000},{"_id":"source/img/jj.png","mtime":1475329037000},{"_id":"source/img/longmao.jpg","mtime":1475329037000},{"_id":"source/img/viewController.png","mtime":1475329037000},{"_id":"themes/yilia/README.md","mtime":1475329037000},{"_id":"themes/yilia/_config.yml","mtime":1475329037000},{"_id":"themes/yilia/package.json","mtime":1475329037000},{"_id":"themes/yilia/scripts/fancybox.js","mtime":1475329037000},{"_id":"themes/yilia/layout/archive.ejs","mtime":1475329037000},{"_id":"themes/yilia/layout/category.ejs","mtime":1475329037000},{"_id":"themes/yilia/layout/index.ejs","mtime":1475329037000},{"_id":"themes/yilia/layout/layout.ejs","mtime":1475329037000},{"_id":"themes/yilia/layout/page.ejs","mtime":1475329037000},{"_id":"themes/yilia/layout/post.ejs","mtime":1475329037000},{"_id":"themes/yilia/layout/tag.ejs","mtime":1475329037000},{"_id":"themes/yilia/layout/_partial/after-footer.ejs","mtime":1475329037000},{"_id":"themes/yilia/layout/_partial/archive-post.ejs","mtime":1475329037000},{"_id":"themes/yilia/layout/_partial/archive.ejs","mtime":1475329037000},{"_id":"themes/yilia/layout/_partial/article.ejs","mtime":1475329037000},{"_id":"themes/yilia/layout/_partial/footer.ejs","mtime":1475329037000},{"_id":"themes/yilia/layout/_partial/google-analytics.ejs","mtime":1475329037000},{"_id":"themes/yilia/layout/_partial/head.ejs","mtime":1475329037000},{"_id":"themes/yilia/layout/_partial/header.ejs","mtime":1475329037000},{"_id":"themes/yilia/layout/_partial/left-col.ejs","mtime":1475329037000},{"_id":"themes/yilia/layout/_partial/mobile-nav.ejs","mtime":1475329037000},{"_id":"themes/yilia/layout/_partial/post/category.ejs","mtime":1475329037000},{"_id":"themes/yilia/layout/_partial/post/date.ejs","mtime":1475329037000},{"_id":"themes/yilia/layout/_partial/post/duoshuo.ejs","mtime":1475329037000},{"_id":"themes/yilia/layout/_partial/post/nav.ejs","mtime":1475329037000},{"_id":"themes/yilia/layout/_partial/post/share.ejs","mtime":1475329037000},{"_id":"themes/yilia/layout/_partial/post/tag.ejs","mtime":1475329037000},{"_id":"themes/yilia/layout/_partial/post/title.ejs","mtime":1475329037000},{"_id":"themes/yilia/source/img/coderwall.png","mtime":1475329037000},{"_id":"themes/yilia/source/img/delicious.png","mtime":1475329037000},{"_id":"themes/yilia/source/img/facebook.png","mtime":1475329037000},{"_id":"themes/yilia/source/img/github.png","mtime":1475329037000},{"_id":"themes/yilia/source/img/google.png","mtime":1475329037000},{"_id":"themes/yilia/source/img/img-err.png","mtime":1475329037000},{"_id":"themes/yilia/source/img/img-loading.png","mtime":1475329037000},{"_id":"themes/yilia/source/img/linkedin.png","mtime":1475329037000},{"_id":"themes/yilia/source/img/pinboard.png","mtime":1475329037000},{"_id":"themes/yilia/source/img/pinterest.png","mtime":1475329037000},{"_id":"themes/yilia/source/img/rss.png","mtime":1475329037000},{"_id":"themes/yilia/source/img/stackoverflow.png","mtime":1475329037000},{"_id":"themes/yilia/source/img/twitter.png","mtime":1475329037000},{"_id":"themes/yilia/source/img/weibo.png","mtime":1475329037000},{"_id":"themes/yilia/source/js/instagram.js","mtime":1475329037000},{"_id":"themes/yilia/source/js/jquery.lazyload.js","mtime":1475329037000},{"_id":"themes/yilia/source/js/main.js","mtime":1475329037000},{"_id":"themes/yilia/source/js/script.js","mtime":1475329037000},{"_id":"themes/yilia/source/css/_extend.styl","mtime":1475329037000},{"_id":"themes/yilia/source/css/_variables.styl","mtime":1475329037000},{"_id":"themes/yilia/source/css/style.styl","mtime":1475329037000},{"_id":"themes/yilia/source/css/_partial/article.styl","mtime":1475329037000},{"_id":"themes/yilia/source/css/_partial/archive.styl","mtime":1475329037000},{"_id":"themes/yilia/source/css/_partial/footer.styl","mtime":1475329037000},{"_id":"themes/yilia/source/css/_partial/header.styl","mtime":1475329037000},{"_id":"themes/yilia/source/css/_partial/highlight.styl","mtime":1475329037000},{"_id":"themes/yilia/source/css/_partial/instagram.styl","mtime":1475329037000},{"_id":"themes/yilia/source/css/_partial/main.styl","mtime":1475329037000},{"_id":"themes/yilia/source/css/_partial/mobile.styl","mtime":1475329037000},{"_id":"themes/yilia/source/css/_partial/page.styl","mtime":1475329037000},{"_id":"themes/yilia/source/css/_partial/share.styl","mtime":1475329037000},{"_id":"themes/yilia/source/css/_partial/tagcloud.styl","mtime":1475329037000},{"_id":"themes/yilia/source/css/_util/grid.styl","mtime":1475329037000},{"_id":"themes/yilia/source/css/_util/mixin.styl","mtime":1475329037000},{"_id":"themes/yilia/source/css/fonts/fontawesome-webfont.eot","mtime":1475329037000},{"_id":"themes/yilia/source/css/fonts/fontawesome-webfont.svg","mtime":1475329037000},{"_id":"themes/yilia/source/css/fonts/fontawesome-webfont.svgz","mtime":1475329037000},{"_id":"themes/yilia/source/css/fonts/fontawesome-webfont.ttf","mtime":1475329037000},{"_id":"themes/yilia/source/css/fonts/fontawesome-webfont.woff","mtime":1475329037000},{"_id":"themes/yilia/source/fancybox/blank.gif","mtime":1475329037000},{"_id":"themes/yilia/source/fancybox/fancybox_loading.gif","mtime":1475329037000},{"_id":"themes/yilia/source/fancybox/[email protected]","mtime":1475329037000},{"_id":"themes/yilia/source/fancybox/fancybox_overlay.png","mtime":1475329037000},{"_id":"themes/yilia/source/fancybox/fancybox_sprite.png","mtime":1475329037000},{"_id":"themes/yilia/source/fancybox/[email protected]","mtime":1475329037000},{"_id":"themes/yilia/source/fancybox/jquery.fancybox.css","mtime":1475329037000},{"_id":"themes/yilia/source/fancybox/jquery.fancybox.js","mtime":1475329037000},{"_id":"themes/yilia/source/fancybox/jquery.fancybox.pack.js","mtime":1475329037000},{"_id":"themes/yilia/source/fancybox/helpers/fancybox_buttons.png","mtime":1475329037000},{"_id":"themes/yilia/source/fancybox/helpers/jquery.fancybox-buttons.js","mtime":1475329037000},{"_id":"themes/yilia/source/fancybox/helpers/jquery.fancybox-buttons.css","mtime":1475329037000},{"_id":"themes/yilia/source/fancybox/helpers/jquery.fancybox-media.js","mtime":1475329037000},{"_id":"themes/yilia/source/fancybox/helpers/jquery.fancybox-thumbs.css","mtime":1475329037000},{"_id":"themes/yilia/source/fancybox/helpers/jquery.fancybox-thumbs.js","mtime":1475329037000},{"_id":"themes/yilia/source/assets/blogImg/Thumbs.db","mtime":1475329037000},{"_id":"themes/yilia/source/assets/blogImg/border1px.jpg","mtime":1475329037000},{"_id":"themes/yilia/source/assets/blogImg/browser-history.jpg","mtime":1475329037000},{"_id":"themes/yilia/source/assets/blogImg/browser-history2.jpg","mtime":1475329037000},{"_id":"themes/yilia/source/assets/blogImg/bys0.jpg","mtime":1475329037000},{"_id":"themes/yilia/source/assets/blogImg/bys1.jpg","mtime":1475329037000},{"_id":"themes/yilia/source/assets/blogImg/bys2.jpg","mtime":1475329037000},{"_id":"themes/yilia/source/assets/blogImg/bys3.jpg","mtime":1475329037000},{"_id":"themes/yilia/source/assets/blogImg/ckxt0.jpg","mtime":1475329037000},{"_id":"themes/yilia/source/assets/blogImg/ckxt1.jpg","mtime":1475329037000},{"_id":"themes/yilia/source/assets/blogImg/ckxt2.jpg","mtime":1475329037000},{"_id":"themes/yilia/source/assets/blogImg/ckxt3.jpg","mtime":1475329037000},{"_id":"themes/yilia/source/assets/blogImg/ckxt4.jpg","mtime":1475329037000},{"_id":"themes/yilia/source/assets/blogImg/css3_anm.jpg","mtime":1475329037000},{"_id":"themes/yilia/source/assets/blogImg/css_hack.jpg","mtime":1475329037000},{"_id":"themes/yilia/source/assets/blogImg/immersion.png","mtime":1475329037000},{"_id":"themes/yilia/source/assets/blogImg/imp_search.jpg","mtime":1475329037000},{"_id":"themes/yilia/source/assets/blogImg/instagram1.jpg","mtime":1475329037000},{"_id":"themes/yilia/source/assets/blogImg/instagram2.jpg","mtime":1475329037000},{"_id":"themes/yilia/source/assets/blogImg/jiugongge1.jpg","mtime":1475329037000},{"_id":"themes/yilia/source/assets/blogImg/jiugongge10.jpg","mtime":1475329037000},{"_id":"themes/yilia/source/assets/blogImg/jiugongge2.jpg","mtime":1475329037000},{"_id":"themes/yilia/source/assets/blogImg/jiugongge3.jpg","mtime":1475329037000},{"_id":"themes/yilia/source/assets/blogImg/jiugongge4.jpg","mtime":1475329037000},{"_id":"themes/yilia/source/assets/blogImg/jiugongge5.jpg","mtime":1475329037000},{"_id":"themes/yilia/source/assets/blogImg/jiugongge6.jpg","mtime":1475329037000},{"_id":"themes/yilia/source/assets/blogImg/jiugongge7.jpg","mtime":1475329037000},{"_id":"themes/yilia/source/assets/blogImg/jiugongge8.jpg","mtime":1475329037000},{"_id":"themes/yilia/source/assets/blogImg/jiugongge9.jpg","mtime":1475329037000},{"_id":"themes/yilia/source/assets/blogImg/lijiang.jpg","mtime":1475329037000},{"_id":"themes/yilia/source/assets/blogImg/lock.jpg","mtime":1475329037000},{"_id":"themes/yilia/source/assets/blogImg/mediator1.jpg","mtime":1475329037000},{"_id":"themes/yilia/source/assets/blogImg/myReader0.jpg","mtime":1475329037000},{"_id":"themes/yilia/source/assets/blogImg/rabbit.jpg","mtime":1475329037000},{"_id":"themes/yilia/source/assets/blogImg/reduce-http.jpg","mtime":1475329037000},{"_id":"themes/yilia/source/assets/blogImg/safety_001.jpg","mtime":1475329037000},{"_id":"themes/yilia/source/assets/blogImg/safety_002.jpg","mtime":1475329037000},{"_id":"themes/yilia/source/assets/blogImg/safety_003.jpg","mtime":1475329037000},{"_id":"themes/yilia/source/assets/blogImg/safety_004.jpg","mtime":1475329037000},{"_id":"themes/yilia/source/assets/blogImg/safety_005.jpg","mtime":1475329037000},{"_id":"themes/yilia/source/assets/blogImg/up1_tips.jpg","mtime":1475329037000},{"_id":"themes/yilia/source/assets/blogImg/volunteer1.jpg","mtime":1475329037000},{"_id":"themes/yilia/source/assets/blogImg/volunteer2.jpg","mtime":1475329037000},{"_id":"themes/yilia/source/assets/blogImg/volunteer3.jpg","mtime":1475329037000},{"_id":"themes/yilia/source/assets/blogImg/web_worker1.png","mtime":1475329037000},{"_id":"themes/yilia/source/assets/blogImg/web_worker2.png","mtime":1475329037000},{"_id":"themes/yilia/source/assets/blogImg/xmas_ico0.jpg","mtime":1475329037000},{"_id":"themes/yilia/source/assets/blogImg/xmas_ico1.jpg","mtime":1475329037000},{"_id":"themes/yilia/source/assets/blogImg/xmas_ico2.jpg","mtime":1475329037000},{"_id":"themes/yilia/source/assets/blogImg/xmas_ico3.jpg","mtime":1475329037000},{"_id":"themes/yilia/source/assets/demo/border1px.html","mtime":1475329037000},{"_id":"themes/yilia/source/assets/demo/hack_demo.html","mtime":1475329037000},{"_id":"themes/yilia/source/assets/demo/jiugongge_demo.html","mtime":1475329037000},{"_id":"themes/yilia/source/assets/demo/jiugongge_demo2.html","mtime":1475329037000},{"_id":"themes/yilia/source/assets/demo/jquery.js","mtime":1475329037000},{"_id":"themes/yilia/source/assets/demo/coffee_pc_demo/pro-con.html","mtime":1475329037000},{"_id":"themes/yilia/source/assets/demo/coffee_pc_demo/pro-con.js","mtime":1475329037000},{"_id":"themes/yilia/source/assets/demo/mediator/demo.html","mtime":1475329037000},{"_id":"themes/yilia/source/assets/demo/mediator/mediator.js","mtime":1475329037000},{"_id":"themes/yilia/source/assets/demo/mediator/sgws.jpg","mtime":1475329037000},{"_id":"themes/yilia/source/assets/demo/pre_css3_demo/Thumbs.db","mtime":1475329037000},{"_id":"themes/yilia/source/assets/demo/pre_css3_demo/demo.html","mtime":1475329037000},{"_id":"themes/yilia/source/assets/demo/pre_css3_demo/bg.jpg","mtime":1475329037000},{"_id":"themes/yilia/source/assets/demo/pre_css3_demo/mhxy.png","mtime":1475329037000},{"_id":"themes/yilia/source/assets/demo/gift/index.html","mtime":1475329037000},{"_id":"themes/yilia/source/assets/demo/gift/img/paper-b.jpg","mtime":1475329037000},{"_id":"themes/yilia/source/assets/demo/gift/img/paper.jpg","mtime":1475329037000},{"_id":"themes/yilia/source/assets/demo/gift/img/shake.png","mtime":1475329037000},{"_id":"themes/yilia/source/assets/demo/gift/js/index.main.js","mtime":1475329037000},{"_id":"themes/yilia/source/assets/demo/gift/js/shake.js","mtime":1475329037000},{"_id":"themes/yilia/source/assets/demo/gift/js/zepto.min.js","mtime":1475329037000},{"_id":"themes/yilia/source/assets/demo/gift/css/index.css","mtime":1475329037000},{"_id":"themes/yilia/source/assets/demo/gift/css/index.scss","mtime":1475329037000},{"_id":"themes/yilia/source/assets/demo/gift/css/reset.css","mtime":1475329037000},{"_id":"themes/yilia/source/assets/demo/gift/media/gift.ogg","mtime":1475329037000},{"_id":"themes/yilia/source/assets/demo/my_news_reader/index.html","mtime":1475329037000},{"_id":"themes/yilia/source/assets/demo/my_news_reader/js/main.js","mtime":1475329037000},{"_id":"themes/yilia/source/assets/demo/my_news_reader/js/tagConfig.js","mtime":1475329037000},{"_id":"source/_posts/Swift-API-Design-Guidelines中文.md","mtime":1475332270000}],"Category":[],"Page":[{"content":"<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n\t<meta charset=\"UTF-8\">\n\t<title>404</title>\n</head>\n<body>\n\t<script type=\"text/javascript\" src=\"http://www.qq.com/404/search_children.js\" charset=\"utf-8\"></script>\n</body>\n</html>","source":"404.html","raw":"<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n\t<meta charset=\"UTF-8\">\n\t<title>404</title>\n</head>\n<body>\n\t<script type=\"text/javascript\" src=\"http://www.qq.com/404/search_children.js\" charset=\"utf-8\"></script>\n</body>\n</html>","date":1475329037000,"updated":1475329037000,"path":"404.html","excerpt":"","_id":"re8cerrwfsxmom5f","title":"","comments":true,"layout":"page"}],"Post":[{"title":"View Program","date":1420714052000,"tags":["ic3pvv8l9xocagtc"],"content":"<h3 id=\"The_view_draw_cycle_『view生命周期』\">The view draw cycle 『view生命周期』</h3>\n<p>When a view first appears on the screen, the system asks it to draw its content. The system captures a snapshot of this content and uses that snapshot as the view’s visual representation. If you never change the view’s content, the view’s drawing<br>code may never be called again. The snapshot image is reused for most operations involving the view. If you do change the content, you notify the system that the view has changed. The view then repeats the process of drawing the view and capturing a snapshot of the new results.</p>\n<p>当你的view内容变化的时候,我们不直接重绘它,而是通过<em>setNeedsDisplay</em>和<em>setNeedsDisplayInRect:</em>方法通知系统去帮我们完成重绘。</p>\n<blockquote>\n<p>When the contents of your view change, you do not redraw those changes directly. Instead, you invalidate the view using either the setNeedsDisplay or setNeedsDisplayInRect: method. </p>\n</blockquote>\n<h3 id=\"Content_Mode_『如何拉伸属性』\">Content Mode 『如何拉伸属性』</h3>\n<p>设置当view的形状发生变化时,它的content如何重绘,例如图片是拉伸,平铺等。</p>\n<blockquote>\n<p>Each view has a content mode that controls how the view recycles its content in response to changes in the view’s geometry and whether it recycles its content at all. </p>\n</blockquote>\n<p>一般有这些类型 </p>\n<ul>\n<li>UIViewContentModeScaleAspectFill <em>【满屏-不变形】</em></li>\n<li>UIViewContentModeScaleAspectFit <em>【适屏-不变形】</em></li>\n<li>UIViewContentModeScaleToFill <em>【拉到铺满-会变形】</em></li>\n</ul>\n<p>你也可以使用自己定义的<strong>drawRect:</strong>方法来自定义,此时应该设置Contenct Mode为: </p>\n<ul>\n<li>UIViewContentModeRedraw </li>\n</ul>\n<h3 id=\"Built-In_Animation_Support『动画』\">Built-In Animation Support『动画』</h3>\n<p>要使用动画,只需两个步骤 </p>\n<ul>\n<li>告诉UIKit你希望执行动画</li>\n<li>改变属性的值<blockquote>\n<ol>\n<li>Tell UIKit that you want to perform an animation.</li>\n<li>Change the value of the property. </li>\n</ol>\n</blockquote>\n</li>\n</ul>\n<figure class=\"highlight\"><table><tr><td class=\"gutter\"><pre><div class=\"line\">1</div><div class=\"line\">2</div><div class=\"line\">3</div><div class=\"line\">4</div><div class=\"line\">5</div><div class=\"line\">6</div><div class=\"line\">7</div><div class=\"line\">8</div><div class=\"line\">9</div><div class=\"line\">10</div><div class=\"line\">11</div></pre></td><td class=\"code\"><pre><div class=\"line\"><span class=\"preprocessor\">#例子为某个viewController中的方法,self.view为视图控制器根式图</span></div><div class=\"line\"><span class=\"preprocessor\">#告诉UIKit你希望执行动画</span></div><div class=\"line\">[<span class=\"built_in\">UIView</span> beginAnimations:<span class=\"string\">@\"View Flip\"</span> context:<span class=\"literal\">NULL</span>];</div><div class=\"line\">[<span class=\"built_in\">UIView</span> setAnimationDuration:<span class=\"number\">0.4</span>];</div><div class=\"line\">[<span class=\"built_in\">UIView</span> setAnimationCurve:UIViewAnimationCurveEaseInOut];</div><div class=\"line\">..<span class=\"variable\">.other</span> codes</div><div class=\"line\"><span class=\"preprocessor\">#在指定的view中假如动画</span></div><div class=\"line\">[<span class=\"built_in\">UIView</span> setAnimationTransition:UIViewAnimationTransitionFlipFromLeft forView:<span class=\"keyword\">self</span><span class=\"variable\">.view</span> cache:<span class=\"literal\">YES</span>];</div><div class=\"line\">..<span class=\"variable\">.other</span> codes</div><div class=\"line\"><span class=\"preprocessor\">#提交动画</span></div><div class=\"line\">[<span class=\"built_in\">UIView</span> commitAnimations];</div></pre></td></tr></table></figure>\n\n<p><a id=\"more\"></a></p>\n<h3 id=\"View_Geometry_and_Coordinate_Systems_『坐标系统』\">View Geometry and Coordinate Systems 『坐标系统』</h3>\n<p>The Relationship of the Frame, Bounds, and Center Properties<br>A view object tracks its size and location using its frame, bounds, and center properties:<br>● The <strong>frame</strong> property contains the frame rectangle, which specifies the size and location of the view in its <strong><em>superview’s coordinate system.『frame是相对父视图的坐标系统』</em></strong><br>● The <strong>bounds</strong> property contains the bounds rectangle, which specifies the size of the view (and its content origin) in the view’s own <strong><em>local coordinate system.『bounds是相对自身坐标系统 』</em></strong><br>● The center property contains the known center point of the view in the <strong><em>superview’s coordinate system.『center也是相对父视图坐标系统』</em></strong> </p>\n<p>更改view的形状和坐标值,一边我们使用Frame和Center属性。</p>\n<blockquote>\n<p>You use the center and frame properties primarily for manipulating the geometry of the current view.If you are changing only the position of the view (and not its size), the center property is the preferred way to do so.</p>\n</blockquote>\n<p>Bounds就是定义了在view自身中的一个区域, 在这个区域内画的图形才是可见的.</p>\n<blockquote>\n<p>You use the bounds property primarily during drawing. The bounds rectangle is expressed in the view’s own local coordinate system. The default origin of this rectangle is (0, 0) and its size matches the size of the frame rectangle. Anything you draw inside this rectangle is part of the view’s visible content.</p>\n</blockquote>\n<h3 id=\"Points_Versus_Pixels_『坐标与像素』\">Points Versus Pixels 『坐标与像素』</h3>\n<p>在iOS中的所有坐标值和距离都是用浮点数坐标Points表示的.</p>\n<blockquote>\n<p>Device Screen dimensions (in points) </p>\n<p>iPhone and iPod touch devices with 4-inch Retina display <strong>320 x 568</strong><br>Other iPhone and iPod touch devices <strong>320 x 480</strong><br>iPad <strong>768 x 1024</strong> </p>\n</blockquote>\n<h2 id=\"Windows『窗口』\">Windows『窗口』</h2>\n<p>每个iOS程序至少需要一个窗口(UIWindow类), 有些可能程序可能需要多个. 一个window主要负责这些事项:<br>一个提供显示的区域, 传递事件和与view controller一起为屏幕旋转提供支持.</p>\n<p>Every iOS application needs at least one window—an instance of the UIWindow class—and some may include more than one window. A window object has several responsibilities: </p>\n<ul>\n<li>It contains your application’s visible content. </li>\n<li>It plays a key role in the delivery of touch events to your views and other application objects. </li>\n<li>It works with your application’s view controllers to facilitate orientation changes. </li>\n</ul>\n<blockquote>\n<p>In iOS, windows do not have title bars, close boxes, or any other visual adornments. A window is always just a blank container for one or more views. Also, applications do not change their content by showing new windows. When you want to change the displayed content, you change the frontmost views of your window instead.</p>\n</blockquote>\n<h3 id=\"Creating_a_Window_Programmatically_『创建窗口』\">Creating a Window Programmatically 『创建窗口』</h3>\n<p>通过代码创建窗口</p>\n<figure class=\"highlight\"><table><tr><td class=\"gutter\"><pre><div class=\"line\">1</div><div class=\"line\">2</div><div class=\"line\">3</div><div class=\"line\">4</div></pre></td><td class=\"code\"><pre><div class=\"line\">self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]</div><div class=\"line\">autorelease];</div><div class=\"line\"><span class=\"keyword\">...</span></div><div class=\"line\">[self.window makeKeyAndVisible];</div></pre></td></tr></table></figure>\n\n<h3 id=\"Adding_Content_to_Your_Window_『添加content到窗口』\">Adding Content to Your Window 『添加content到窗口』</h3>\n<p>通常每个window都有一个root view对象, 它包含所有其他views并显示内容. 这样的话如果你需要更新窗口中的内容, 你仅需要替换root view就可以完成. 安装一个view到你的window中, 使用<strong>addSubview:</strong>方法. 例如安装一个由view controller管理的视图:</p>\n<blockquote>\n<p>Each window typically has a single root view object (managed by a corresponding view controller) that contains all of the other views representing your content. Using a single root view simplifies the process of changing your interface; to display new content, all you have to do is replace the root view. To install a view in your<br>window, use the addSubview: method. For example, to install a view that is managed by a view controller, you would use code similar to the following: </p>\n</blockquote>\n<figure class=\"highlight\"><table><tr><td class=\"gutter\"><pre><div class=\"line\">1</div></pre></td><td class=\"code\"><pre><div class=\"line\">[window addSubvie<span class=\"variable\">w:viewController</span>.<span class=\"keyword\">view</span>];</div></pre></td></tr></table></figure>\n\n<p>如果在nib设置中设置了root viewController, 当window加载时, UIKit将自动安装root viewController中的view到window中.</p>\n<blockquote>\n<p>If the root view of your window is provided by a container view controller (such as a <strong>tabbar controller, navigation controller, or split-view controller</strong>), you do not need to set the initial size of the view yourself. The container view controller automatically sizes its view appropriately based on whether the status bar is visible.</p>\n</blockquote>\n<h3 id=\"Monitoring_Window_Changes_『监视窗口变化』\">Monitoring Window Changes 『监视窗口变化』</h3>\n<p>If you want to track the appearance or disappearance of windows inside your application, you can do so using these window-related notifications: </p>\n<ul>\n<li>UIWindowDidBecomeVisibleNotification</li>\n<li>UIWindowDidBecomeHiddenNotification </li>\n<li>UIWindowDidBecomeKeyNotification </li>\n<li>UIWindowDidResignKeyNotification </li>\n</ul>\n<h2 id=\"View_『视图』\">View 『视图』</h2>\n<p>由于view是你的程序中与用户最主要的交互的交互方式, view有非常多的功能, 例如下面这些:</p>\n<ul>\n<li>Layout and subview management<ul>\n<li>A view defines its own default resizing behaviors in relation to its parent view.</li>\n<li>A view can manage a list of subviews.</li>\n<li>A view can override the size and position of its subviews as needed.</li>\n<li>A view can convert points in its coordinate system to the coordinate systems of other views or the<br>window.</li>\n</ul>\n</li>\n<li>Drawing and animation<ul>\n<li>A view draws content in its rectangular area.</li>\n<li>Some view properties can be animated to new values.</li>\n</ul>\n</li>\n<li>Event handling<ul>\n<li>A view can receive touch events.</li>\n<li>A view participates in the responder chain.</li>\n</ul>\n</li>\n</ul>\n<h3 id=\"Creating_and_Configuring_View_Objects『创建和设置视图』\">Creating and Configuring View Objects『创建和设置视图』</h3>\n<p>手动在程序中创建一个view: </p>\n<figure class=\"highlight\"><table><tr><td class=\"gutter\"><pre><div class=\"line\">1</div><div class=\"line\">2</div></pre></td><td class=\"code\"><pre><div class=\"line\"><span class=\"built_in\">CGRect</span> viewRect = CGRectMake(<span class=\"number\">0</span>, <span class=\"number\">0</span>, <span class=\"number\">100</span>, <span class=\"number\">100</span>); </div><div class=\"line\"><span class=\"built_in\">UIView</span>* myView = [[<span class=\"built_in\">UIView</span> alloc] initWithFrame:viewRect];</div></pre></td></tr></table></figure>\n\n\n\n<h3 id=\"Adding_and_Removing_Subviews_『视图层次管理方法』\">Adding and Removing Subviews 『视图层次管理方法』</h3>\n<p>主要有下面这些方法:</p>\n<ul>\n<li>addSubview:</li>\n<li>insertSubview:…</li>\n<li>bringSubviewToFront:</li>\n<li>sendSubviewToBack:</li>\n<li>exchangeSubviewAtIndex:withSubviewAtIndex:</li>\n<li>removeFromSuperview:</li>\n</ul>\n<p>注意: 如果subview的frame超过了superview的bounds, 默认超出的部分是不会被裁剪掉的,就是会被显示出来,如果需要被裁剪,设置superview中的clipsToBounds属性为YES即可.</p>\n<blockquote>\n<p>A subview whose frame lies outside of its superview’s visible bounds is not clipped by default. If you want your subview to be clipped to the superview’s bounds, you must explicitly set the clipsToBounds property of the superview to YES.</p>\n</blockquote>\n<h3 id=\"Locating_Views_in_a_View_Hierarchy_『定位视图Tag』\">Locating Views in a View Hierarchy 『定位视图Tag』</h3>\n<p>在view hirearchy中获取一个view, 通过如下方法:</p>\n<ul>\n<li>存一个指向这个view的指针</li>\n<li>给view标识一个tag, 通过<strong>viewWithTag:</strong>方法获取它</li>\n</ul>\n<figure class=\"highlight\"><table><tr><td class=\"gutter\"><pre><div class=\"line\">1</div><div class=\"line\">2</div><div class=\"line\">3</div><div class=\"line\">4</div><div class=\"line\">5</div></pre></td><td class=\"code\"><pre><div class=\"line\">#通过<span class=\"keyword\">tag</span>属性设置<span class=\"keyword\">tag</span>值</div><div class=\"line\">#@property(nonatomic) NSInteger <span class=\"keyword\">tag</span></div><div class=\"line\">myView.<span class=\"keyword\">tag</span>=<span class=\"number\">100</span>;</div><div class=\"line\">#通过viewWithTag:方法获取指定<span class=\"keyword\">tag</span>值的<span class=\"keyword\">view</span></div><div class=\"line\">UIView* herView=[self.window viewWithTa<span class=\"variable\">g:100</span>]</div></pre></td></tr></table></figure>\n\n<blockquote>\n<p>There are two ways to locate views in a view hierarchy:</p>\n<ul>\n<li>Store pointers to any relevant views in an appropriate location, such as in the view controller that owns the views. </li>\n<li>Assign a unique integer to each view’s tag property and use the viewWithTag: method to locate it.</li>\n</ul>\n</blockquote>\n<h3 id=\"Translating,_Scaling,_and_Rotating_Views『平移缩放和旋转』\">Translating, Scaling, and Rotating Views『平移缩放和旋转』</h3>\n<p>通过view中的transform属性来旋转 </p>\n<figure class=\"highlight\"><table><tr><td class=\"gutter\"><pre><div class=\"line\">1</div><div class=\"line\">2</div><div class=\"line\">3</div><div class=\"line\">4</div><div class=\"line\">5</div><div class=\"line\">6</div><div class=\"line\">7</div><div class=\"line\">8</div><div class=\"line\">9</div><div class=\"line\">10</div></pre></td><td class=\"code\"><pre><div class=\"line\"><span class=\"preprocessor\">#对视图比例缩放</span></div><div class=\"line\">CGAffineTransform CGAffineTransformScale ( CGAffineTransform t, CGFloat sx, CGFloat sy );</div><div class=\"line\"><span class=\"preprocessor\">#对视图做变焦旋转</span></div><div class=\"line\">CGAffineTransform CGAffineTransformRotate ( CGAffineTransform t, CGFloat angle );</div><div class=\"line\"><span class=\"preprocessor\">#对视图做平移</span></div><div class=\"line\">CGAffineTransform CGAffineTransformConcat ( CGAffineTransform t1, CGAffineTransform t2 );</div><div class=\"line\"></div><div class=\"line\"><span class=\"preprocessor\"># M_PI/4.0 is one quarter of a half circle, or 45 degrees. </span></div><div class=\"line\">CGAffineTransform xform = CGAffineTransformMakeRotation(M_PI/<span class=\"number\">4.0</span>); </div><div class=\"line\">self.view.transform = xform;</div></pre></td></tr></table></figure>\n\n<h3 id=\"Converting_Coordinates_in_the_View_Hierarchy『坐标系统转换』\">Converting Coordinates in the View Hierarchy『坐标系统转换』</h3>\n<p>坐标转换</p>\n<p>convertPoint:fromView:<br>convertRect:fromView:<br>convertPoint:toView:<br>convertRect:toView:<br>convertPoint:fromWindow:<br>convertRect:fromWindow:<br>convertPoint:toWindow:<br>convertRect:toWindow: </p>\n","source":"_posts/View-Program.md","raw":"title: View Program\ndate: 2015-01-08 18:47:32\ntags: iOS\n---\n\n###The view draw cycle 『view生命周期』\nWhen a view first appears on the screen, the system asks it to draw its content. The system captures a snapshot of this content and uses that snapshot as the view’s visual representation. If you never change the view’s content, the view’s drawing\ncode may never be called again. The snapshot image is reused for most operations involving the view. If you do change the content, you notify the system that the view has changed. The view then repeats the process of drawing the view and capturing a snapshot of the new results.\n\n当你的view内容变化的时候,我们不直接重绘它,而是通过*setNeedsDisplay*和*setNeedsDisplayInRect:*方法通知系统去帮我们完成重绘。\n>When the contents of your view change, you do not redraw those changes directly. Instead, you invalidate the view using either the setNeedsDisplay or setNeedsDisplayInRect: method. \n\n###Content Mode 『如何拉伸属性』\n\n设置当view的形状发生变化时,它的content如何重绘,例如图片是拉伸,平铺等。\n>Each view has a content mode that controls how the view recycles its content in response to changes in the view’s geometry and whether it recycles its content at all. \n\n一般有这些类型 \n\n* UIViewContentModeScaleAspectFill\t\t*【满屏-不变形】*\n* UIViewContentModeScaleAspectFit\t\t*【适屏-不变形】*\n* UIViewContentModeScaleToFill\t\t\t*【拉到铺满-会变形】*\n\n你也可以使用自己定义的**drawRect:**方法来自定义,此时应该设置Contenct Mode为: \n\n* UIViewContentModeRedraw \n\n###Built-In Animation Support『动画』\n要使用动画,只需两个步骤 \n\n* 告诉UIKit你希望执行动画\n* 改变属性的值\n>1. Tell UIKit that you want to perform an animation.\n>2. Change the value of the property. \n\n```\n#例子为某个viewController中的方法,self.view为视图控制器根式图\n#告诉UIKit你希望执行动画\n[UIView beginAnimations:@\"View Flip\" context:NULL];\n[UIView setAnimationDuration:0.4];\n[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];\n...other codes\n#在指定的view中假如动画\n[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft forView:self.view cache:YES];\n...other codes\n#提交动画\n[UIView commitAnimations];\n\n```\n\n<!--more-->\n###View Geometry and Coordinate Systems 『坐标系统』\n\n\nThe Relationship of the Frame, Bounds, and Center Properties \nA view object tracks its size and location using its frame, bounds, and center properties: \n● The **frame** property contains the frame rectangle, which specifies the size and location of the view in its ***superview’s coordinate system.『frame是相对父视图的坐标系统』*** \n● The **bounds** property contains the bounds rectangle, which specifies the size of the view (and its content origin) in the view’s own ***local coordinate system.『bounds是相对自身坐标系统 』*** \n● The center property contains the known center point of the view in the ***superview’s coordinate system.『center也是相对父视图坐标系统』*** \n\n更改view的形状和坐标值,一边我们使用Frame和Center属性。\n>You use the center and frame properties primarily for manipulating the geometry of the current view.If you are changing only the position of the view (and not its size), the center property is the preferred way to do so.\n\nBounds就是定义了在view自身中的一个区域, 在这个区域内画的图形才是可见的.\n>You use the bounds property primarily during drawing. The bounds rectangle is expressed in the view’s own local coordinate system. The default origin of this rectangle is (0, 0) and its size matches the size of the frame rectangle. Anything you draw inside this rectangle is part of the view’s visible content.\n\n###Points Versus Pixels 『坐标与像素』\n\n在iOS中的所有坐标值和距离都是用浮点数坐标Points表示的.\n\n>Device Screen dimensions (in points) \n> \niPhone and iPod touch devices with 4-inch Retina display **320 x 568** \nOther iPhone and iPod touch devices **320 x 480** \niPad **768 x 1024** \n\n##Windows『窗口』\n每个iOS程序至少需要一个窗口(UIWindow类), 有些可能程序可能需要多个. 一个window主要负责这些事项:\n一个提供显示的区域, 传递事件和与view controller一起为屏幕旋转提供支持.\n\nEvery iOS application needs at least one window—an instance of the UIWindow class—and some may include more than one window. A window object has several responsibilities: \n \n* It contains your application’s visible content. \n* It plays a key role in the delivery of touch events to your views and other application objects. \n* It works with your application’s view controllers to facilitate orientation changes. \n\n>In iOS, windows do not have title bars, close boxes, or any other visual adornments. A window is always just a blank container for one or more views. Also, applications do not change their content by showing new windows. When you want to change the displayed content, you change the frontmost views of your window instead.\n\n###Creating a Window Programmatically 『创建窗口』\n通过代码创建窗口\n\n```\nself.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]\nautorelease];\n...\n[self.window makeKeyAndVisible];\n```\n###Adding Content to Your Window 『添加content到窗口』\n\n通常每个window都有一个root view对象, 它包含所有其他views并显示内容. 这样的话如果你需要更新窗口中的内容, 你仅需要替换root view就可以完成. 安装一个view到你的window中, 使用**addSubview:**方法. 例如安装一个由view controller管理的视图:\n\n>Each window typically has a single root view object (managed by a corresponding view controller) that contains all of the other views representing your content. Using a single root view simplifies the process of changing your interface; to display new content, all you have to do is replace the root view. To install a view in your\nwindow, use the addSubview: method. For example, to install a view that is managed by a view controller, you would use code similar to the following: \n \n```\n[window addSubview:viewController.view];\n```\n\n如果在nib设置中设置了root viewController, 当window加载时, UIKit将自动安装root viewController中的view到window中.\n\n>If the root view of your window is provided by a container view controller (such as a **tabbar controller, navigation controller, or split-view controller**), you do not need to set the initial size of the view yourself. The container view controller automatically sizes its view appropriately based on whether the status bar is visible.\n\n###Monitoring Window Changes 『监视窗口变化』\nIf you want to track the appearance or disappearance of windows inside your application, you can do so using these window-related notifications: \n\n* UIWindowDidBecomeVisibleNotification\n* UIWindowDidBecomeHiddenNotification \n* UIWindowDidBecomeKeyNotification \n* UIWindowDidResignKeyNotification \n\n##View 『视图』\n\n由于view是你的程序中与用户最主要的交互的交互方式, view有非常多的功能, 例如下面这些:\n \n* Layout and subview management\n\t* A view defines its own default resizing behaviors in relation to its parent view.\n\t* A view can manage a list of subviews.\n\t* A view can override the size and position of its subviews as needed.\n\t* A view can convert points in its coordinate system to the coordinate systems of other views or the\nwindow.\n* Drawing and animation\n\t* A view draws content in its rectangular area.\n\t* Some view properties can be animated to new values.\n* Event handling\n\t* A view can receive touch events.\n\t* A view participates in the responder chain.\n\n###Creating and Configuring View Objects『创建和设置视图』\n\n手动在程序中创建一个view: \n \n```\nCGRect viewRect = CGRectMake(0, 0, 100, 100); \nUIView* myView = [[UIView alloc] initWithFrame:viewRect];\n``` \n\n###Adding and Removing Subviews 『视图层次管理方法』\n主要有下面这些方法:\n\n* addSubview:\n* insertSubview:...\n* bringSubviewToFront:\n* sendSubviewToBack:\n* exchangeSubviewAtIndex:withSubviewAtIndex:\n* removeFromSuperview:\n\n注意: 如果subview的frame超过了superview的bounds, 默认超出的部分是不会被裁剪掉的,就是会被显示出来,如果需要被裁剪,设置superview中的clipsToBounds属性为YES即可.\n>A subview whose frame lies outside of its superview’s visible bounds is not clipped by default. If you want your subview to be clipped to the superview’s bounds, you must explicitly set the clipsToBounds property of the superview to YES.\n\n###Locating Views in a View Hierarchy 『定位视图Tag』\n在view hirearchy中获取一个view, 通过如下方法:\n\n* 存一个指向这个view的指针\n* 给view标识一个tag, 通过**viewWithTag:**方法获取它\n\n```\n#通过tag属性设置tag值\n#@property(nonatomic) NSInteger tag\nmyView.tag=100;\n#通过viewWithTag:方法获取指定tag值的view\nUIView* herView=[self.window viewWithTag:100]\n\n```\n\n\n>There are two ways to locate views in a view hierarchy:\n> \n* Store pointers to any relevant views in an appropriate location, such as in the view controller that owns the views. \n* Assign a unique integer to each view’s tag property and use the viewWithTag: method to locate it.\n\n###Translating, Scaling, and Rotating Views『平移缩放和旋转』\n通过view中的transform属性来旋转 \n\n```\n#对视图比例缩放\nCGAffineTransform CGAffineTransformScale ( CGAffineTransform t, CGFloat sx, CGFloat sy );\n#对视图做变焦旋转\nCGAffineTransform CGAffineTransformRotate ( CGAffineTransform t, CGFloat angle );\n#对视图做平移\nCGAffineTransform CGAffineTransformConcat ( CGAffineTransform t1, CGAffineTransform t2 );\n\n# M_PI/4.0 is one quarter of a half circle, or 45 degrees. \nCGAffineTransform xform = CGAffineTransformMakeRotation(M_PI/4.0); \nself.view.transform = xform; \n```\n\n###Converting Coordinates in the View Hierarchy『坐标系统转换』\n坐标转换\n\nconvertPoint:fromView: \nconvertRect:fromView: \nconvertPoint:toView: \nconvertRect:toView: \nconvertPoint:fromWindow: \nconvertRect:fromWindow: \nconvertPoint:toWindow: \nconvertRect:toWindow: \n","slug":"View-Program","updated":1475329037000,"excerpt":"<h3 id=\"The_view_draw_cycle_『view生命周期』\">The view draw cycle 『view生命周期』</h3>\n<p>When a view first appears on the screen, the system asks it to draw its content. The system captures a snapshot of this content and uses that snapshot as the view’s visual representation. If you never change the view’s content, the view’s drawing<br>code may never be called again. The snapshot image is reused for most operations involving the view. If you do change the content, you notify the system that the view has changed. The view then repeats the process of drawing the view and capturing a snapshot of the new results.</p>\n<p>当你的view内容变化的时候,我们不直接重绘它,而是通过<em>setNeedsDisplay</em>和<em>setNeedsDisplayInRect:</em>方法通知系统去帮我们完成重绘。</p>\n<blockquote>\n<p>When the contents of your view change, you do not redraw those changes directly. Instead, you invalidate the view using either the setNeedsDisplay or setNeedsDisplayInRect: method. </p>\n</blockquote>\n<h3 id=\"Content_Mode_『如何拉伸属性』\">Content Mode 『如何拉伸属性』</h3>\n<p>设置当view的形状发生变化时,它的content如何重绘,例如图片是拉伸,平铺等。</p>\n<blockquote>\n<p>Each view has a content mode that controls how the view recycles its content in response to changes in the view’s geometry and whether it recycles its content at all. </p>\n</blockquote>\n<p>一般有这些类型 </p>\n<ul>\n<li>UIViewContentModeScaleAspectFill <em>【满屏-不变形】</em></li>\n<li>UIViewContentModeScaleAspectFit <em>【适屏-不变形】</em></li>\n<li>UIViewContentModeScaleToFill <em>【拉到铺满-会变形】</em></li>\n</ul>\n<p>你也可以使用自己定义的<strong>drawRect:</strong>方法来自定义,此时应该设置Contenct Mode为: </p>\n<ul>\n<li>UIViewContentModeRedraw </li>\n</ul>\n<h3 id=\"Built-In_Animation_Support『动画』\">Built-In Animation Support『动画』</h3>\n<p>要使用动画,只需两个步骤 </p>\n<ul>\n<li>告诉UIKit你希望执行动画</li>\n<li>改变属性的值<blockquote>\n<ol>\n<li>Tell UIKit that you want to perform an animation.</li>\n<li>Change the value of the property. </li>\n</ol>\n</blockquote>\n</li>\n</ul>\n<figure class=\"highlight\"><table><tr><td class=\"gutter\"><pre><div class=\"line\">1</div><div class=\"line\">2</div><div class=\"line\">3</div><div class=\"line\">4</div><div class=\"line\">5</div><div class=\"line\">6</div><div class=\"line\">7</div><div class=\"line\">8</div><div class=\"line\">9</div><div class=\"line\">10</div><div class=\"line\">11</div></pre></td><td class=\"code\"><pre><div class=\"line\"><span class=\"preprocessor\">#例子为某个viewController中的方法,self.view为视图控制器根式图</span></div><div class=\"line\"><span class=\"preprocessor\">#告诉UIKit你希望执行动画</span></div><div class=\"line\">[<span class=\"built_in\">UIView</span> beginAnimations:<span class=\"string\">@\"View Flip\"</span> context:<span class=\"literal\">NULL</span>];</div><div class=\"line\">[<span class=\"built_in\">UIView</span> setAnimationDuration:<span class=\"number\">0.4</span>];</div><div class=\"line\">[<span class=\"built_in\">UIView</span> setAnimationCurve:UIViewAnimationCurveEaseInOut];</div><div class=\"line\">..<span class=\"variable\">.other</span> codes</div><div class=\"line\"><span class=\"preprocessor\">#在指定的view中假如动画</span></div><div class=\"line\">[<span class=\"built_in\">UIView</span> setAnimationTransition:UIViewAnimationTransitionFlipFromLeft forView:<span class=\"keyword\">self</span><span class=\"variable\">.view</span> cache:<span class=\"literal\">YES</span>];</div><div class=\"line\">..<span class=\"variable\">.other</span> codes</div><div class=\"line\"><span class=\"preprocessor\">#提交动画</span></div><div class=\"line\">[<span class=\"built_in\">UIView</span> commitAnimations];</div></pre></td></tr></table></figure>\n\n<p>","_id":"rnxtgcox5h0sfv0o","categories":[],"comments":true,"layout":"post","photos":[],"link":""},{"title":"View Controller","date":1420786131000,"tags":["ic3pvv8l9xocagtc"],"content":"<h3 id=\"ViewController的结构关系\">ViewController的结构关系</h3>\n<ul>\n<li>ViewController中包含一个指向storyboard的指针, 一个项目中只有一个storyboard或者没有, 所有的其他viewController也都指向它.</li>\n<li>viewController中包含一个UIview的指针, 它是这个viewCntroller的根视图, 被viewControl管理的其他视图都在它之上.</li>\n<li>viewControl来负责实现它所管理的视图的响应方式, 这个实现了显示和控制的隔离.</li>\n</ul>\n<p><img src=\"http://i2.tietuku.com/aa8b64d36df89717.png\" alt=\"viewController\"></p>\n<h3 id=\"ViewControl与windows的关系\">ViewControl与windows的关系</h3>\n<p>对下面的图片解释一下: </p>\n<ul>\n<li>window从screen那里获取屏幕的显示信息,根据此初始化UIWindow frame大小.</li>\n<li>UIWindow中包含有一个*rootViewController的指针, 我们让它指向我们的viewController, 这样我们viewControl中的根UIview会自动添加为UIWindow的subView, viewController中的内容就能显示在窗口中了.</li>\n</ul>\n<blockquote>\n<p>A view controller is usually owned by a window or another view controller.If a view controller is owned by a window object, it acts as the window’s root view controller.The view controller’s root view is added as a subview of the window and resized to fill the window.If the view controller is owned by another view controller, then the parent view controller determines when and how the child view controller’s contents are displayed.</p>\n</blockquote>\n<p><a id=\"more\"></a><br><img src=\"http://i2.tietuku.com/5def40f7afd0c98b.png\" alt=\"viewWindows\"></p>\n<h2 id=\"演示4中不同的视图控制实现方式\">演示4中不同的视图控制实现方式</h2>\n<ul>\n<li>完全手动编写ViewControl</li>\n<li>不使用ViewController</li>\n<li>使用nib文件初始化viewController</li>\n<li>使用storyboard管理ViewController</li>\n</ul>\n<p><img src=\"/img/viewController.png\" alt=\"viewController\"></p>\n<h3 id=\"不使用ViewController\">不使用ViewController</h3>\n<ul>\n<li>在AppDelegate中手动完成显示『View』和控制『Controller』</li>\n</ul>\n<figure class=\"highlight\"><table><tr><td class=\"gutter\"><pre><div class=\"line\">1</div><div class=\"line\">2</div><div class=\"line\">3</div><div class=\"line\">4</div><div class=\"line\">5</div><div class=\"line\">6</div><div class=\"line\">7</div><div class=\"line\">8</div><div class=\"line\">9</div><div class=\"line\">10</div><div class=\"line\">11</div><div class=\"line\">12</div><div class=\"line\">13</div><div class=\"line\">14</div><div class=\"line\">15</div><div class=\"line\">16</div><div class=\"line\">17</div><div class=\"line\">18</div><div class=\"line\">19</div><div class=\"line\">20</div><div class=\"line\">21</div><div class=\"line\">22</div><div class=\"line\">23</div><div class=\"line\">24</div><div class=\"line\">25</div><div class=\"line\">26</div><div class=\"line\">27</div><div class=\"line\">28</div><div class=\"line\">29</div><div class=\"line\">30</div><div class=\"line\">31</div><div class=\"line\">32</div><div class=\"line\">33</div><div class=\"line\">34</div><div class=\"line\">35</div><div class=\"line\">36</div><div class=\"line\">37</div><div class=\"line\">38</div><div class=\"line\">39</div></pre></td><td class=\"code\"><pre><div class=\"line\"><span class=\"comment\">//@implementation AppDelegate</span></div><div class=\"line\"><span class=\"comment\">//显示『View』</span></div><div class=\"line\">- (<span class=\"built_in\">BOOL</span>)application:(<span class=\"built_in\">UIApplication</span> *)application didFinishLaunchingWithOptions:(<span class=\"built_in\">NSDictionary</span> *)launchOptions {</div><div class=\"line\"><span class=\"comment\">// Override point for customization after application launch.</span></div><div class=\"line\"> <span class=\"keyword\">self</span><span class=\"variable\">.window</span>=[[<span class=\"built_in\">UIWindow</span> alloc]initWithFrame:[[UIScreen mainScreen] bounds]];</div><div class=\"line\"> <span class=\"keyword\">self</span><span class=\"variable\">.window</span><span class=\"variable\">.backgroundColor</span>=[<span class=\"built_in\">UIColor</span> grayColor]; </div><div class=\"line\"><span class=\"comment\">//contentMode</span></div><div class=\"line\"> <span class=\"built_in\">UIImageView</span> *iv=[[<span class=\"built_in\">UIImageView</span> alloc]initWithImage:image];</div><div class=\"line\"> iv<span class=\"variable\">.tag</span>=<span class=\"number\">10</span>;</div><div class=\"line\"> iv<span class=\"variable\">.contentMode</span>=UIViewContentModeScaleAspectFit;</div><div class=\"line\"> iv<span class=\"variable\">.backgroundColor</span>=[<span class=\"built_in\">UIColor</span> brownColor];</div><div class=\"line\"> iv<span class=\"variable\">.frame</span>=CGRectMake(<span class=\"number\">30</span>, <span class=\"number\">350</span>, <span class=\"number\">260</span>, <span class=\"number\">100</span>);</div><div class=\"line\"><span class=\"comment\">//Affine</span></div><div class=\"line\"> <span class=\"built_in\">UIButton</span> *press=[[<span class=\"built_in\">UIButton</span> alloc] initWithFrame:CGRectMake(<span class=\"number\">200</span>, <span class=\"number\">500</span>, <span class=\"number\">40</span>, <span class=\"number\">10</span>)];</div><div class=\"line\"> press<span class=\"variable\">.backgroundColor</span>=[<span class=\"built_in\">UIColor</span> yellowColor];</div><div class=\"line\"> press<span class=\"variable\">.titleLabel</span><span class=\"variable\">.text</span>=<span class=\"string\">@\"Press me\"</span>;</div><div class=\"line\"> [press addTarget:<span class=\"keyword\">self</span> action:<span class=\"keyword\">@selector</span>(change) forControlEvents:UIControlEventTouchUpInside];</div><div class=\"line\"> </div><div class=\"line\"> [<span class=\"keyword\">self</span><span class=\"variable\">.window</span> addSubview:iv];</div><div class=\"line\"> [<span class=\"keyword\">self</span><span class=\"variable\">.window</span> addSubview:press];</div><div class=\"line\"> [<span class=\"keyword\">self</span><span class=\"variable\">.window</span> makeKeyAndVisible];</div><div class=\"line\"> </div><div class=\"line\"> <span class=\"keyword\">return</span> <span class=\"literal\">YES</span>;</div><div class=\"line\">}</div><div class=\"line\"><span class=\"comment\">//控制『Controller』</span></div><div class=\"line\">-(<span class=\"keyword\">void</span>) change {</div><div class=\"line\"> [<span class=\"built_in\">UIView</span> beginAnimations:<span class=\"string\">@\"chang\"</span> context:<span class=\"literal\">nil</span>];</div><div class=\"line\"> [<span class=\"built_in\">UIView</span> setAnimationDuration:<span class=\"number\">1</span>];</div><div class=\"line\"> [<span class=\"built_in\">UIView</span> setAnimationCurve:UIViewAnimationCurveEaseInOut];</div><div class=\"line\"> </div><div class=\"line\"> <span class=\"built_in\">UIView</span> *view=[<span class=\"keyword\">self</span><span class=\"variable\">.window</span> viewWithTag:<span class=\"number\">101</span>]; <span class=\"comment\">//通过tag获取view</span></div><div class=\"line\"> view<span class=\"variable\">.transform</span>=CGAffineTransformRotate(view<span class=\"variable\">.transform</span>,M_PI/<span class=\"number\">4.0</span>);</div><div class=\"line\"> </div><div class=\"line\"> [<span class=\"built_in\">UIView</span> setAnimationTransition:UIViewAnimationTransitionFlipFromLeft forView:view cache:<span class=\"literal\">YES</span>];</div><div class=\"line\"> </div><div class=\"line\"> [<span class=\"built_in\">UIView</span> commitAnimations];</div><div class=\"line\"> </div><div class=\"line\"> </div><div class=\"line\">}</div></pre></td></tr></table></figure>\n\n<h3 id=\"完全手动编写ViewControl\">完全手动编写ViewControl</h3>\n<ul>\n<li>新建项目,修改xcode项目中deployment info中的信息,将『Main Interface』置成空,删除其对应的<strong><em>Main.Stroyboard</em></strong>,因为我们现在不使用storyboard。</li>\n<li>将deployment info中的Launch Screen File置成空,并删除其对应的文件<strong><em>LanuchScreen.xib</em></strong>,这里也不需要启动程序初始化界面。</li>\n<li>补充AppDelegate代码段</li>\n</ul>\n<figure class=\"highlight\"><table><tr><td class=\"gutter\"><pre><div class=\"line\">1</div><div class=\"line\">2</div><div class=\"line\">3</div><div class=\"line\">4</div><div class=\"line\">5</div><div class=\"line\">6</div><div class=\"line\">7</div><div class=\"line\">8</div><div class=\"line\">9</div></pre></td><td class=\"code\"><pre><div class=\"line\"><span class=\"comment\">//@implementation AppDelegate</span></div><div class=\"line\">- (<span class=\"built_in\">BOOL</span>)application:(<span class=\"built_in\">UIApplication</span> *)application didFinishLaunchingWithOptions:(<span class=\"built_in\">NSDictionary</span> *)launchOptions {</div><div class=\"line\"><span class=\"comment\">// Override point for customization after application launch.</span></div><div class=\"line\"> <span class=\"keyword\">self</span><span class=\"variable\">.window</span>=[[<span class=\"built_in\">UIWindow</span> alloc] initWithFrame:[UIScreen mainScreen]<span class=\"variable\">.bounds</span>];</div><div class=\"line\"> ViewController *rootcontroller=[[ViewController alloc]init];</div><div class=\"line\"> [<span class=\"keyword\">self</span><span class=\"variable\">.window</span> addSubview:rootcontroller<span class=\"variable\">.view</span>];</div><div class=\"line\"> [<span class=\"keyword\">self</span><span class=\"variable\">.window</span> makeKeyAndVisible];</div><div class=\"line\"> <span class=\"keyword\">return</span> <span class=\"literal\">YES</span>;</div><div class=\"line\">}</div></pre></td></tr></table></figure>\n\n<ul>\n<li>在ViewController类中手动添加视图代码,在视图控制器view被加载时调用。</li>\n</ul>\n<figure class=\"highlight\"><table><tr><td class=\"gutter\"><pre><div class=\"line\">1</div><div class=\"line\">2</div><div class=\"line\">3</div><div class=\"line\">4</div><div class=\"line\">5</div><div class=\"line\">6</div><div class=\"line\">7</div><div class=\"line\">8</div><div class=\"line\">9</div><div class=\"line\">10</div><div class=\"line\">11</div><div class=\"line\">12</div><div class=\"line\">13</div><div class=\"line\">14</div><div class=\"line\">15</div><div class=\"line\">16</div><div class=\"line\">17</div><div class=\"line\">18</div><div class=\"line\">19</div><div class=\"line\">20</div></pre></td><td class=\"code\"><pre><div class=\"line\"><span class=\"comment\">//@implementation ViewController</span></div><div class=\"line\"><span class=\"comment\">//视图『View』</span></div><div class=\"line\">- (<span class=\"keyword\">void</span>)viewDidLoad {</div><div class=\"line\"> [<span class=\"keyword\">super</span> viewDidLoad];</div><div class=\"line\"><span class=\"comment\">// Do any additional setup after loading the view, typically from a nib.</span></div><div class=\"line\"> <span class=\"built_in\">UILabel</span>* label=[[<span class=\"built_in\">UILabel</span> alloc]initWithFrame:CGRectMake(<span class=\"number\">50</span>, <span class=\"number\">200</span>, <span class=\"number\">300</span>, <span class=\"number\">20</span>)];</div><div class=\"line\"> label<span class=\"variable\">.text</span>=<span class=\"string\">@\"This ViewController init by code\"</span>;</div><div class=\"line\"> <span class=\"built_in\">UIButton</span>* button=[<span class=\"built_in\">UIButton</span> buttonWithType:UIButtonTypeSystem];</div><div class=\"line\"> button<span class=\"variable\">.frame</span>=CGRectMake(<span class=\"number\">100</span>, <span class=\"number\">400</span>, <span class=\"number\">40</span>, <span class=\"number\">20</span>);</div><div class=\"line\"> button<span class=\"variable\">.titleLabel</span><span class=\"variable\">.text</span>=<span class=\"string\">@\"Press me\"</span>;</div><div class=\"line\"> button<span class=\"variable\">.backgroundColor</span>=[<span class=\"built_in\">UIColor</span> blueColor];</div><div class=\"line\"> [button addTarget:<span class=\"keyword\">self</span> action:<span class=\"keyword\">@selector</span>(press) forControlEvents:UIControlEventTouchUpInside];</div><div class=\"line\"> [<span class=\"keyword\">self</span><span class=\"variable\">.view</span> addSubview:label];</div><div class=\"line\"> [<span class=\"keyword\">self</span><span class=\"variable\">.view</span> addSubview:button];</div><div class=\"line\"> <span class=\"keyword\">self</span><span class=\"variable\">.view</span><span class=\"variable\">.backgroundColor</span>=[<span class=\"built_in\">UIColor</span> yellowColor];</div><div class=\"line\">}</div><div class=\"line\"><span class=\"comment\">//控制『Controller』</span></div><div class=\"line\">-(<span class=\"keyword\">void</span>)press {</div><div class=\"line\"> <span class=\"keyword\">self</span><span class=\"variable\">.view</span><span class=\"variable\">.backgroundColor</span>=[<span class=\"built_in\">UIColor</span> greenColor];</div><div class=\"line\">}</div></pre></td></tr></table></figure>\n\n<h3 id=\"使用nib文件初始化viewController\">使用nib文件初始化viewController</h3>\n<ul>\n<li>新建项目,修改xcode项目中deployment info中的信息,将『Main Interface』置成空,删除其对应的<strong><em>Main.Stroyboard</em></strong>,因为我们现在不使用storyboard。</li>\n<li>将deployment info中的Launch Screen File置成空,并删除其对应的文件<strong><em>LanuchScreen.xib</em></strong>,这里也不需要启动程序初始化界面。</li>\n<li>创建试图控制器类『ViewController』以及其对应的xib文件『ViewController.xib』,并在属性界面『identify』中添加关联,将xib文件与ViewController关联起来,然后在『connections』属性中的view拉一根线指向xib文件的视图区域。</li>\n<li>现在就可以在『ViewController.xib』文件中添加视图空间,完成界面设计了。</li>\n<li>补充AppDelegate中的启动初始化代码,如下:</li>\n</ul>\n<figure class=\"highlight\"><table><tr><td class=\"gutter\"><pre><div class=\"line\">1</div><div class=\"line\">2</div><div class=\"line\">3</div><div class=\"line\">4</div><div class=\"line\">5</div><div class=\"line\">6</div><div class=\"line\">7</div><div class=\"line\">8</div><div class=\"line\">9</div><div class=\"line\">10</div><div class=\"line\">11</div><div class=\"line\">12</div><div class=\"line\">13</div></pre></td><td class=\"code\"><pre><div class=\"line\"><span class=\"comment\">//@implementation AppDelegate</span></div><div class=\"line\">- (<span class=\"built_in\">BOOL</span>)application:(<span class=\"built_in\">UIApplication</span> *)application didFinishLaunchingWithOptions:(<span class=\"built_in\">NSDictionary</span> *)launchOptions {</div><div class=\"line\"> <span class=\"keyword\">self</span><span class=\"variable\">.window</span>=[[<span class=\"built_in\">UIWindow</span> alloc] initWithFrame:[UIScreen mainScreen]<span class=\"variable\">.bounds</span>];</div><div class=\"line\"> ViewController *rootcontroller=[[ViewController alloc]initWithNibName:<span class=\"string\">@\"ViewController\"</span> bundle:<span class=\"literal\">nil</span>];</div><div class=\"line\"> <span class=\"comment\">//------------*</span></div><div class=\"line\"> <span class=\"keyword\">self</span><span class=\"variable\">.window</span><span class=\"variable\">.rootViewController</span>=rootcontroller;</div><div class=\"line\"> <span class=\"comment\">//rootcontroller的view会被自动添加为self.window的subview,被会自动根据screen的值调整view画布大小</span></div><div class=\"line\"> <span class=\"comment\">//--上面这一段也可以用下面的表示</span></div><div class=\"line\"> <span class=\"comment\">//[self.window addSubview:rootcontroller.view];</span></div><div class=\"line\"> <span class=\"comment\">//------------*</span></div><div class=\"line\"> [<span class=\"keyword\">self</span><span class=\"variable\">.window</span> makeKeyAndVisible];</div><div class=\"line\"> <span class=\"keyword\">return</span> <span class=\"literal\">YES</span>;</div><div class=\"line\">}</div></pre></td></tr></table></figure>\n\n<ul>\n<li>在ViewController.m中完成完成控制代码,这个我们经常做,从控件拉一条剪头到ViewControler.m中,并实现,xcode自动完成UIControl与方法的绑定『-addTarget:action:forControlEvents:』。</li>\n</ul>\n<blockquote>\n<p>在使用nib文件时,启动时将自动从nib文件中加载并<strong>生产相应的视图代码段</strong>,供给viewController使用,而且我发现当通过nib文件初始化界面后一次,后面即使你删掉这个nib文件,视图依旧能正常加载并工作。</p>\n</blockquote>\n<h3 id=\"使用storyboard管理ViewController\">使用storyboard管理ViewController</h3>\n<p>现在开始学iOS的同学,估计一开始就是直接用storyboard,相当方便。连上面AppDelegate部分的代码都不需要写了,下面说一下要使用storyboard相比上面要设置哪些东西。 </p>\n<ul>\n<li>由于使用storyboard需要xcode自动去帮我们完成试图控器的加载,我们需要在『项目名』->『Deployment info』->『Main Interface』属性处设置你项目中创建的storyboard的名称。</li>\n<li>其次,在你的众多或者唯一的viewController『attributes inspector』属性中设置为『is initial View Contr』</li>\n</ul>\n","source":"_posts/View-Controller.md","raw":"title: View Controller\ndate: 2015-01-09 14:48:51\ntags: iOS\n---\n###ViewController的结构关系\n* ViewController中包含一个指向storyboard的指针, 一个项目中只有一个storyboard或者没有, 所有的其他viewController也都指向它.\n* viewController中包含一个UIview的指针, 它是这个viewCntroller的根视图, 被viewControl管理的其他视图都在它之上.\n* viewControl来负责实现它所管理的视图的响应方式, 这个实现了显示和控制的隔离.\n\n![viewController](http://i2.tietuku.com/aa8b64d36df89717.png)\n\n###ViewControl与windows的关系\n对下面的图片解释一下: \n\n* window从screen那里获取屏幕的显示信息,根据此初始化UIWindow frame大小.\n* UIWindow中包含有一个*rootViewController的指针, 我们让它指向我们的viewController, 这样我们viewControl中的根UIview会自动添加为UIWindow的subView, viewController中的内容就能显示在窗口中了.\n\n> A view controller is usually owned by a window or another view controller.If a view controller is owned by a window object, it acts as the window’s root view controller.The view controller’s root view is added as a subview of the window and resized to fill the window.If the view controller is owned by another view controller, then the parent view controller determines when and how the child view controller’s contents are displayed.\n\n<!--more-->\n![viewWindows](http://i2.tietuku.com/5def40f7afd0c98b.png)\n\n##演示4中不同的视图控制实现方式\n* 完全手动编写ViewControl\n* 不使用ViewController\n* 使用nib文件初始化viewController\n* 使用storyboard管理ViewController\n\n![viewController](/img/viewController.png)\n\n\n###不使用ViewController\n* 在AppDelegate中手动完成显示『View』和控制『Controller』\n\n```\n//@implementation AppDelegate\n//显示『View』\n- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {\n// Override point for customization after application launch.\n self.window=[[UIWindow alloc]initWithFrame:[[UIScreen mainScreen] bounds]];\n self.window.backgroundColor=[UIColor grayColor]; \n//contentMode\n UIImageView *iv=[[UIImageView alloc]initWithImage:image];\n iv.tag=10;\n iv.contentMode=UIViewContentModeScaleAspectFit;\n iv.backgroundColor=[UIColor brownColor];\n iv.frame=CGRectMake(30, 350, 260, 100);\n//Affine\n UIButton *press=[[UIButton alloc] initWithFrame:CGRectMake(200, 500, 40, 10)];\n press.backgroundColor=[UIColor yellowColor];\n press.titleLabel.text=@\"Press me\";\n [press addTarget:self action:@selector(change) forControlEvents:UIControlEventTouchUpInside];\n \n [self.window addSubview:iv];\n [self.window addSubview:press];\n [self.window makeKeyAndVisible];\n \n return YES;\n}\n//控制『Controller』\n-(void) change {\n [UIView beginAnimations:@\"chang\" context:nil];\n [UIView setAnimationDuration:1];\n [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];\n \n UIView *view=[self.window viewWithTag:101]; //通过tag获取view\n view.transform=CGAffineTransformRotate(view.transform,M_PI/4.0);\n \n [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft forView:view cache:YES];\n \n [UIView commitAnimations];\n \n \n}\n```\n\n\n###完全手动编写ViewControl\n* 新建项目,修改xcode项目中deployment info中的信息,将『Main Interface』置成空,删除其对应的***Main.Stroyboard***,因为我们现在不使用storyboard。\n* 将deployment info中的Launch Screen File置成空,并删除其对应的文件***LanuchScreen.xib***,这里也不需要启动程序初始化界面。\n* 补充AppDelegate代码段\n\n```\n//@implementation AppDelegate\n- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {\n// Override point for customization after application launch.\n self.window=[[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];\n ViewController *rootcontroller=[[ViewController alloc]init];\n [self.window addSubview:rootcontroller.view];\n [self.window makeKeyAndVisible];\n return YES;\n}\n```\n* 在ViewController类中手动添加视图代码,在视图控制器view被加载时调用。\n\n```\n//@implementation ViewController\n//视图『View』\n- (void)viewDidLoad {\n [super viewDidLoad];\n// Do any additional setup after loading the view, typically from a nib.\n UILabel* label=[[UILabel alloc]initWithFrame:CGRectMake(50, 200, 300, 20)];\n label.text=@\"This ViewController init by code\";\n UIButton* button=[UIButton buttonWithType:UIButtonTypeSystem];\n button.frame=CGRectMake(100, 400, 40, 20);\n button.titleLabel.text=@\"Press me\";\n button.backgroundColor=[UIColor blueColor];\n [button addTarget:self action:@selector(press) forControlEvents:UIControlEventTouchUpInside];\n [self.view addSubview:label];\n [self.view addSubview:button];\n self.view.backgroundColor=[UIColor yellowColor];\n}\n//控制『Controller』\n-(void)press {\n self.view.backgroundColor=[UIColor greenColor];\n}\n```\n\n\n###使用nib文件初始化viewController\n\n* 新建项目,修改xcode项目中deployment info中的信息,将『Main Interface』置成空,删除其对应的***Main.Stroyboard***,因为我们现在不使用storyboard。\n* 将deployment info中的Launch Screen File置成空,并删除其对应的文件***LanuchScreen.xib***,这里也不需要启动程序初始化界面。\n* 创建试图控制器类『ViewController』以及其对应的xib文件『ViewController.xib』,并在属性界面『identify』中添加关联,将xib文件与ViewController关联起来,然后在『connections』属性中的view拉一根线指向xib文件的视图区域。\n* 现在就可以在『ViewController.xib』文件中添加视图空间,完成界面设计了。\n* 补充AppDelegate中的启动初始化代码,如下:\n\n```\n//@implementation AppDelegate\n- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {\n self.window=[[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];\n ViewController *rootcontroller=[[ViewController alloc]initWithNibName:@\"ViewController\" bundle:nil];\n //------------*\n self.window.rootViewController=rootcontroller;\n //rootcontroller的view会被自动添加为self.window的subview,被会自动根据screen的值调整view画布大小\n //--上面这一段也可以用下面的表示\n //[self.window addSubview:rootcontroller.view];\n //------------*\n [self.window makeKeyAndVisible];\n return YES;\n}\n```\n* 在ViewController.m中完成完成控制代码,这个我们经常做,从控件拉一条剪头到ViewControler.m中,并实现,xcode自动完成UIControl与方法的绑定『-addTarget:action:forControlEvents:』。\n\n\n>在使用nib文件时,启动时将自动从nib文件中加载并**生产相应的视图代码段**,供给viewController使用,而且我发现当通过nib文件初始化界面后一次,后面即使你删掉这个nib文件,视图依旧能正常加载并工作。\n\n###使用storyboard管理ViewController\n\n现在开始学iOS的同学,估计一开始就是直接用storyboard,相当方便。连上面AppDelegate部分的代码都不需要写了,下面说一下要使用storyboard相比上面要设置哪些东西。 \n\n* 由于使用storyboard需要xcode自动去帮我们完成试图控器的加载,我们需要在『项目名』->『Deployment info』->『Main Interface』属性处设置你项目中创建的storyboard的名称。\n* 其次,在你的众多或者唯一的viewController『attributes inspector』属性中设置为『is initial View Contr』\n\n\n","slug":"View-Controller","updated":1475329037000,"excerpt":"<h3 id=\"ViewController的结构关系\">ViewController的结构关系</h3>\n<ul>\n<li>ViewController中包含一个指向storyboard的指针, 一个项目中只有一个storyboard或者没有, 所有的其他viewController也都指向它.</li>\n<li>viewController中包含一个UIview的指针, 它是这个viewCntroller的根视图, 被viewControl管理的其他视图都在它之上.</li>\n<li>viewControl来负责实现它所管理的视图的响应方式, 这个实现了显示和控制的隔离.</li>\n</ul>\n<p><img src=\"http://i2.tietuku.com/aa8b64d36df89717.png\" alt=\"viewController\"></p>\n<h3 id=\"ViewControl与windows的关系\">ViewControl与windows的关系</h3>\n<p>对下面的图片解释一下: </p>\n<ul>\n<li>window从screen那里获取屏幕的显示信息,根据此初始化UIWindow frame大小.</li>\n<li>UIWindow中包含有一个*rootViewController的指针, 我们让它指向我们的viewController, 这样我们viewControl中的根UIview会自动添加为UIWindow的subView, viewController中的内容就能显示在窗口中了.</li>\n</ul>\n<blockquote>\n<p>A view controller is usually owned by a window or another view controller.If a view controller is owned by a window object, it acts as the window’s root view controller.The view controller’s root view is added as a subview of the window and resized to fill the window.If the view controller is owned by another view controller, then the parent view controller determines when and how the child view controller’s contents are displayed.</p>\n</blockquote>\n<p>","_id":"lrfd8eutvhzy4sgu","categories":[],"comments":true,"layout":"post","photos":[],"link":""},{"title":"Swift API Design Guidelines中文","date":1475332229000,"tags":["ewmehznbej12ls8s"],"content":"<h2 id=\"原则\"><strong>原则</strong></h2>\n<p>在使用时的语义清楚为第一要素<br>语义清楚比简洁更重要</p>\n<h2 id=\"命名\">命名</h2>\n<h3 id=\"增强使用时的语义\">增强使用时的语义</h3>\n<h4 id=\"加上所有能消除歧义并增加可读性的词汇\">加上所有能消除歧义并增加可读性的词汇</h4>\n<blockquote>\n<p>例如:<br>public mutating func remove(at position: Index) -> Element<br>employees.remove(at: x)<br><code>at</code> 提高了可读性和增强意图</p>\n</blockquote>\n<h4 id=\"去除累赘、并不能增强可读性的词,尤其那些只是重复描述了参数类型的词\">去除累赘、并不能增强可读性的词,尤其那些只是重复描述了参数类型的词</h4>\n<blockquote>\n<p>例如:<br>removeElement(<em> member: Element) -> Element?<br>应该去掉Element:remove(</em> member: Element) -> Element?</p>\n</blockquote>\n<h4 id=\"变量、参数、associated_types的命名,描述它们的角色,而不是类型\">变量、参数、associated types的命名,描述它们的角色,而不是类型</h4>\n<blockquote>\n<p>例如:<br>restock(from widgetFactory: WidgetFactory)<br>应该是:restock(from supplier: WidgetFactory)</p>\n</blockquote>\n<h4 id=\"对于类型信息不能明确表达意图的类型,例如NSObject,_Any,_AnyObject,_Int,_String,加上弱的类型描述信息来增强可读性。\">对于类型信息不能明确表达意图的类型,例如NSObject, Any, AnyObject, Int, String,加上弱的类型描述信息来增强可读性。</h4>\n<blockquote>\n<p>例如:<br>func add(<em> observer: NSObject, for keyPath: String)<br>grid.add(self, for: graphics) // 语义不清<br>应该是:<br>func addObserver(</em> observer: NSObject, forKeyPath path: String)<br>grid.addObserver(self, forKeyPath: graphics) // 清楚</p>\n</blockquote>\n<h3 id=\"让用起来语义更流畅\">让用起来语义更流畅</h3>\n<h4 id=\"让方法和函数的命名在使用时读起来符合英文的语法规则\">让方法和函数的命名在使用时读起来符合英文的语法规则</h4>\n<blockquote>\n<p>例如:<br>x.insert(y, at: z) “x, insert y at z”<br>x.subViews(havingColor: y) “x’s subviews having color y”<br>x.capitalizingNouns() “x, capitalizing nouns”</p>\n</blockquote>\n<h4 id=\"工厂类方法名以make开头\">工厂类方法名以make开头</h4>\n<blockquote>\n<p>例如:x.makeIterator()</p>\n</blockquote>\n<h4 id=\"初始化和工厂方法名不应该包含第一个参数标签名,保持初始化方法参数结构独立性。\">初始化和工厂方法名不应该包含第一个参数标签名,保持初始化方法参数结构独立性。</h4>\n<blockquote>\n<p>例如:<br>x.makeWidget(count: 47)<br>Color(red: 32, green: 64, blue: 128)<br>factory.makeWidget(gears: 42, spindles: 14)</p>\n</blockquote>\n<h4 id=\"方法或函数的命名应该能描述它的副作用性\">方法或函数的命名应该能描述它的副作用性</h4>\n<ul>\n<li>没有副作用的,应该读起来为名词,例如:x.distance(to: y), i.successor()</li>\n<li>有副作用的,应该读起来为动词,例如:x.sort(), x.append(y)</li>\n</ul>\n<p>协议,用来描述是什么类型,应该读起来为名词,例如:Collection<br>协议,用户描述能做什么,应该使用后缀<code>able</code>、<code>ible</code>、<code>ing</code>,例如:Equatable,ProgressReporting<br> 类型、属性、变量和常量应该为名词</p>\n<h3 id=\"正确的使用专业术语\">正确的使用专业术语</h3>\n<p>尽量避免使用令人费解的专业术语,仅非常必要时使用。<br>如果你一定要使用专业术语,用的时候要符合它的本意,不要用它来表达一个与术语本身含义有偏差的事物。<br>避免使用缩写,除非它是广为人知并能轻松在网上搜索到的。<br>使用已有的、被业界广泛使用和约定俗成的术语。</p>\n<blockquote>\n<p>例如:<br>使用术语Array来描述一组连续数据结构,而不是普通的List。<br>数学计算中,使用sin(x),而不是自己为了表达这个意思琢磨出来的一个新词汇。</p>\n</blockquote>\n<h2 id=\"约定\">约定</h2>\n<h3 id=\"常规约定\">常规约定</h3>\n<p>对于时间复杂度不为O(1)的方法,要在文档中标明。<br>除非特殊情况,使用方法和属性而非全局函数。<br>遵循大小写约定,类型和协议大写驼峰命名,其他的全部小写驼峰命名<br>对于基本意思相同而参数类型不同的,使用多态来保持方法名相同。</p>\n<h3 id=\"参数\">参数</h3>\n<h4 id=\"选择提高函数可读性的参数名\">选择提高函数可读性的参数名</h4>\n<blockquote>\n<p>例如:<br>func move(from start: Point, to end: Point)</p>\n</blockquote>\n<h4 id=\"利用为参数提供默认值的便利\">利用为参数提供默认值的便利</h4>\n<blockquote>\n<p>例如:<br>syncData(withCompletion: nil) // 应该给参数提供nil的默认值<br>syncDate() // 有默认值</p>\n</blockquote>\n<h4 id=\"把有默认值的参数放在参数列表的尾部,来保证在省略了尾部参数后的语义连贯性。\">把有默认值的参数放在参数列表的尾部,来保证在省略了尾部参数后的语义连贯性。</h4>\n<h3 id=\"标签\">标签</h3>\n<h4 id=\"当参数不能被有效的描述和区分时,省略所有标签\">当参数不能被有效的描述和区分时,省略所有标签</h4>\n<blockquote>\n<p>例如:<br>min(number1, number2)<br>zip(sequence1, sequence2)</p>\n</blockquote>\n<h4 id=\"当初始化方法是做值的类型转换,省略第一个参数标签\">当初始化方法是做值的类型转换,省略第一个参数标签</h4>\n<blockquote>\n<p>例如:<br>Int64(someUInt32)</p>\n</blockquote>\n<h4 id=\"当第一个参数属于为语义的介词部分,将整个介词部分作为第一个参数标签\">当第一个参数属于为语义的介词部分,将整个介词部分作为第一个参数标签</h4>\n<blockquote>\n<p>例如:<br>x.removeBoxes(havingLength: 12)</p>\n</blockquote>\n<p><strong><em>有一个例外,当前两个参数一起构成一种抽象的类型,第一个参数标签使用介词后面的部分(不包含介词本身),维持抽象类型的清晰性。</em></strong><br>例如:<br>a.move(toX: b, y: c) // 破坏了后面抽象类型的清晰性<br>应该是:<br>a.moveTo(x: b, y: c)<br>a.fadeFrom(red: b, green: c, blue: d)</p>\n<h4 id=\"当第一个参数属于语法完整性的一部分,省略第一个标签\">当第一个参数属于语法完整性的一部分,省略第一个标签</h4>\n<blockquote>\n<p>例如:<br>x.addSubview(y) // vt + 宾语,语法完整<br><strong><em>上面的规则意味着,如果第一个参数不属于语法完整性的一部分,但是又需要它增加可读性时,那么应该使用标签。</em></strong><br>例如:<br>view.dismiss(animated: false)<br>words.split(maxSplits: 12)<br>students.sorted(isOrderedBefore: Student.name)<br>规律:动词都是vi不及物动词,第一个标签都仅仅为描述性词汇,不属于语法部分。</p>\n</blockquote>\n<h2 id=\"特殊说明\">特殊说明</h2>\n<h4 id=\"给闭包和元组加上参数名字\">给闭包和元组加上参数名字</h4>\n<h4 id=\"特别注意参数类型可能为Any,AnyObject等多态函数带来的歧义。\">特别注意参数类型可能为Any,AnyObject等多态函数带来的歧义。</h4>\n<blockquote>\n<p>例如:<br>public mutating func append(<em> newElement: Element)<br>public mutating func append(</em> ndwEelements: S) where S.Generator.Element = Element<br>第二个方法本意是append一组数据,但如果Element为Any<br>values.append([2, 3, 4])到底是调用上面哪个方法呢?要避免这种歧义。</p>\n</blockquote>\n","source":"_posts/Swift-API-Design-Guidelines中文.md","raw":"title: Swift API Design Guidelines中文\ndate: 2016-10-01 22:30:29\ntags: Swift\n---\n\n##**原则**\n在使用时的语义清楚为第一要素\n语义清楚比简洁更重要\n\n## 命名\n\n### 增强使用时的语义\n#### 加上所有能消除歧义并增加可读性的词汇\n> 例如:\npublic mutating func remove(at position: Index) -> Element\nemployees.remove(at: x)\n`at` 提高了可读性和增强意图\n\n#### 去除累赘、并不能增强可读性的词,尤其那些只是重复描述了参数类型的词\n> 例如:\nremoveElement(_ member: Element) -> Element?\n应该去掉Element:remove(_ member: Element) -> Element?\n\n#### 变量、参数、associated types的命名,描述它们的角色,而不是类型\n> 例如:\nrestock(from widgetFactory: WidgetFactory)\n应该是:restock(from supplier: WidgetFactory)\n\n#### 对于类型信息不能明确表达意图的类型,例如NSObject, Any, AnyObject, Int, String,加上弱的类型描述信息来增强可读性。\n> 例如:\nfunc add(_ observer: NSObject, for keyPath: String)\ngrid.add(self, for: graphics) // 语义不清\n应该是:\nfunc addObserver(_ observer: NSObject, forKeyPath path: String)\ngrid.addObserver(self, forKeyPath: graphics) // 清楚\n\n### 让用起来语义更流畅\n#### 让方法和函数的命名在使用时读起来符合英文的语法规则\n> 例如:\nx.insert(y, at: z) “x, insert y at z\"\nx.subViews(havingColor: y) “x’s subviews having color y\"\nx.capitalizingNouns() “x, capitalizing nouns\"\n\n#### 工厂类方法名以make开头\n> 例如:x.makeIterator()\n\n#### 初始化和工厂方法名不应该包含第一个参数标签名,保持初始化方法参数结构独立性。\n> 例如:\nx.makeWidget(count: 47)\nColor(red: 32, green: 64, blue: 128)\nfactory.makeWidget(gears: 42, spindles: 14)\n\n#### 方法或函数的命名应该能描述它的副作用性\n- 没有副作用的,应该读起来为名词,例如:x.distance(to: y), i.successor()\n- 有副作用的,应该读起来为动词,例如:x.sort(), x.append(y)\n\n协议,用来描述是什么类型,应该读起来为名词,例如:Collection\n协议,用户描述能做什么,应该使用后缀`able`、`ible`、`ing`,例如:Equatable,ProgressReporting\n 类型、属性、变量和常量应该为名词\n\n### 正确的使用专业术语\n尽量避免使用令人费解的专业术语,仅非常必要时使用。\n如果你一定要使用专业术语,用的时候要符合它的本意,不要用它来表达一个与术语本身含义有偏差的事物。\n避免使用缩写,除非它是广为人知并能轻松在网上搜索到的。\n使用已有的、被业界广泛使用和约定俗成的术语。\n> 例如:\n使用术语Array来描述一组连续数据结构,而不是普通的List。\n数学计算中,使用sin(x),而不是自己为了表达这个意思琢磨出来的一个新词汇。\n\n## 约定\n\n### 常规约定\n对于时间复杂度不为O(1)的方法,要在文档中标明。\n除非特殊情况,使用方法和属性而非全局函数。\n遵循大小写约定,类型和协议大写驼峰命名,其他的全部小写驼峰命名\n对于基本意思相同而参数类型不同的,使用多态来保持方法名相同。\n\n### 参数\n#### 选择提高函数可读性的参数名\n> 例如:\nfunc move(from start: Point, to end: Point)\n\n#### 利用为参数提供默认值的便利\n> 例如:\nsyncData(withCompletion: nil) // 应该给参数提供nil的默认值\nsyncDate() // 有默认值\n\n#### 把有默认值的参数放在参数列表的尾部,来保证在省略了尾部参数后的语义连贯性。\n\n### 标签\n#### 当参数不能被有效的描述和区分时,省略所有标签\n> 例如:\nmin(number1, number2)\nzip(sequence1, sequence2)\n\n#### 当初始化方法是做值的类型转换,省略第一个参数标签\n> 例如:\nInt64(someUInt32)\n\n#### 当第一个参数属于为语义的介词部分,将整个介词部分作为第一个参数标签\n> 例如:\nx.removeBoxes(havingLength: 12)\n\n***有一个例外,当前两个参数一起构成一种抽象的类型,第一个参数标签使用介词后面的部分(不包含介词本身),维持抽象类型的清晰性。***\n例如:\na.move(toX: b, y: c) // 破坏了后面抽象类型的清晰性\n应该是:\na.moveTo(x: b, y: c)\na.fadeFrom(red: b, green: c, blue: d)\n\n#### 当第一个参数属于语法完整性的一部分,省略第一个标签\n> 例如:\nx.addSubview(y) // vt + 宾语,语法完整\n***上面的规则意味着,如果第一个参数不属于语法完整性的一部分,但是又需要它增加可读性时,那么应该使用标签。***\n例如:\nview.dismiss(animated: false)\nwords.split(maxSplits: 12)\nstudents.sorted(isOrderedBefore: Student.name)\n规律:动词都是vi不及物动词,第一个标签都仅仅为描述性词汇,不属于语法部分。\n\n## 特殊说明\n#### 给闭包和元组加上参数名字\n#### 特别注意参数类型可能为Any,AnyObject等多态函数带来的歧义。\n> 例如:\npublic mutating func append(_ newElement: Element)\npublic mutating func append(_ ndwEelements: S) where S.Generator.Element = Element\n第二个方法本意是append一组数据,但如果Element为Any\nvalues.append([2, 3, 4])到底是调用上面哪个方法呢?要避免这种歧义。\n\n\n","slug":"Swift-API-Design-Guidelines中文","updated":1475332270000,"excerpt":"","_id":"89urtvfbloi1somv","categories":[],"comments":true,"layout":"post","photos":[],"link":""}],"Tag":[{"name":"iOS","_id":"ic3pvv8l9xocagtc","posts":["rnxtgcox5h0sfv0o","lrfd8eutvhzy4sgu"]},{"name":"随笔","_id":"xxx4h2aj3rrqhdw3","posts":[]},{"name":"Swift","_id":"ewmehznbej12ls8s","posts":["89urtvfbloi1somv"]}]}