锘??xml version="1.0" encoding="utf-8" standalone="yes"?>久久久久久夜精品精品免费啦,久久精品国产国产精品四凭,久久er国产精品免费观看8http://m.shnenglu.com/cokecoffe/category/17906.htmlzh-cnTue, 05 Jun 2012 03:19:09 GMTTue, 05 Jun 2012 03:19:09 GMT60NavigationController鐨勪嬌鐢?/title><link>http://m.shnenglu.com/cokecoffe/archive/2012/06/03/177341.html</link><dc:creator>Wangkeke</dc:creator><author>Wangkeke</author><pubDate>Sun, 03 Jun 2012 09:34:00 GMT</pubDate><guid>http://m.shnenglu.com/cokecoffe/archive/2012/06/03/177341.html</guid><wfw:comment>http://m.shnenglu.com/cokecoffe/comments/177341.html</wfw:comment><comments>http://m.shnenglu.com/cokecoffe/archive/2012/06/03/177341.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.shnenglu.com/cokecoffe/comments/commentRss/177341.html</wfw:commentRss><trackback:ping>http://m.shnenglu.com/cokecoffe/services/trackbacks/177341.html</trackback:ping><description><![CDATA[<h1>1.鍒涘緩</h1> <blockquote> <h4><span style="font-weight: normal;">閫氳繃xib鍒涘緩</span></h4> <p>閫氳繃浠g爜鍒涘緩</p> </blockquote> <p>涓涓猆INavigationcontroller鍖呮嫭 navigation bar,鍙夌殑navigation toolbar,RootViewController.</p> <h1>2.瀵艱埅鏍?/h1> <p>鏈夊洓涓柟娉?/p> <blockquote> <ul class="tooltip" style="list-style-type: none; list-style-position: outside; list-style-image: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.5em; padding-top: 0px; padding-right: 0px; padding-bottom: 0.5em; padding-left: 0px; white-space: nowrap;"> <li style="margin-top: 0.167em; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span id="ormjjdf" class="tooltip"><code style="font-size: 13px; font-family: Courier, Consolas, monospace; color: #666666;"><a style="color: #3366cc; text-decoration: none;" href="file:///Users/Wangkeke/Library/Developer/Shared/Documentation/DocSets/com.apple.adc.documentation.AppleiOS5_1.iOSLibrary.docset/Contents/Resources/Documents/documentation/UIKit/Reference/UINavigationController_Class/Reference/Reference.html#//apple_ref/occ/instm/UINavigationController/pushViewController:animated:">– pushViewController:animated:</a></code></span></li> <li style="margin-top: 0.167em; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span id="vobmmfj" class="tooltip"><code style="font-size: 13px; font-family: Courier, Consolas, monospace; color: #666666;"><a style="color: #3366cc; text-decoration: none;" href="file:///Users/Wangkeke/Library/Developer/Shared/Documentation/DocSets/com.apple.adc.documentation.AppleiOS5_1.iOSLibrary.docset/Contents/Resources/Documents/documentation/UIKit/Reference/UINavigationController_Class/Reference/Reference.html#//apple_ref/occ/instm/UINavigationController/popViewControllerAnimated:">– popViewControllerAnimated:</a></code></span></li> <li style="margin-top: 0.167em; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span id="qmgrhmp" class="tooltip"><code style="font-size: 13px; font-family: Courier, Consolas, monospace; color: #666666;"><a style="color: #3366cc; text-decoration: none;" href="file:///Users/Wangkeke/Library/Developer/Shared/Documentation/DocSets/com.apple.adc.documentation.AppleiOS5_1.iOSLibrary.docset/Contents/Resources/Documents/documentation/UIKit/Reference/UINavigationController_Class/Reference/Reference.html#//apple_ref/occ/instm/UINavigationController/popToRootViewControllerAnimated:">– popToRootViewControllerAnimated:</a></code></span></li> <li style="margin-top: 0.167em; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span id="gqugctu" class="tooltip"><code style="font-size: 13px; font-family: Courier, Consolas, monospace; color: #666666;"><a style="color: #3366cc; text-decoration: none;" href="file:///Users/Wangkeke/Library/Developer/Shared/Documentation/DocSets/com.apple.adc.documentation.AppleiOS5_1.iOSLibrary.docset/Contents/Resources/Documents/documentation/UIKit/Reference/UINavigationController_Class/Reference/Reference.html#//apple_ref/occ/instm/UINavigationController/popToViewController:animated:">– popToViewController:animated:</a></code></span></li> </ul> </blockquote> <ul class="tooltip" style="list-style-type: none; list-style-position: outside; list-style-image: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.5em; padding-top: 0px; padding-right: 0px; padding-bottom: 0.5em; padding-left: 0px; white-space: nowrap;"> 渚嬪錛屾兂鎺ㄨ繘涓涓柊鐨剉iewcontroller錛屽埌瀵艱埅鏍堜腑,浠g爜錛? </ul> <pre class="objc" style="padding: 0px; margin: 0px; width: auto; clear: none; overflow: visible; font-size: 12px; line-height: 1.333; white-space: pre; color: #110000; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; background-color: #f9f9f9; font-family: monospace;"><span style="padding: 0px; margin: 0px; color: #002200;">-</span> <span style="padding: 0px; margin: 0px; color: #002200;">(</span><span style="padding: 0px; margin: 0px; color: #a61390;">void</span><span style="padding: 0px; margin: 0px; color: #002200;">)</span>tableView<span style="padding: 0px; margin: 0px; color: #002200;">:</span><span style="padding: 0px; margin: 0px; color: #002200;">(</span>UITableView <span style="padding: 0px; margin: 0px; color: #002200;">*</span><span style="padding: 0px; margin: 0px; color: #002200;">)</span>tableView didSelectRowAtIndexPath<span style="padding: 0px; margin: 0px; color: #002200;">:</span><span style="padding: 0px; margin: 0px; color: #002200;">(</span><span style="padding: 0px; margin: 0px; color: #400080;">NSIndexPath</span> <span style="padding: 0px; margin: 0px; color: #002200;">*</span><span style="padding: 0px; margin: 0px; color: #002200;">)</span>indexPath <span style="padding: 0px; margin: 0px; color: #002200;">{</span> <span style="padding: 0px; margin: 0px; color: #002200;">[</span><span style="padding: 0px; margin: 0px; color: #002200;">[</span>tableView cellForRowAtIndexPath<span style="padding: 0px; margin: 0px; color: #002200;">:</span>indexPath<span style="padding: 0px; margin: 0px; color: #002200;">]</span> setSelected<span style="padding: 0px; margin: 0px; color: #002200;">:</span><span style="padding: 0px; margin: 0px; color: #a61390;">NO</span> animated<span style="padding: 0px; margin: 0px; color: #002200;">:</span><span style="padding: 0px; margin: 0px; color: #a61390;">YES</span><span style="padding: 0px; margin: 0px; color: #002200;">]</span>;//1.   DetailsViewController <span style="padding: 0px; margin: 0px; color: #002200;">*</span>detailsViewController <span style="padding: 0px; margin: 0px; color: #002200;">=</span> <span style="padding: 0px; margin: 0px; color: #002200;">[</span><span style="padding: 0px; margin: 0px; color: #002200;">[</span>DetailsViewController alloc<span style="padding: 0px; margin: 0px; color: #002200;">]</span> initWithNibName<span style="padding: 0px; margin: 0px; color: #002200;">:</span><span style="padding: 0px; margin: 0px; color: #bf1d1a;">@</span><span style="padding: 0px; margin: 0px; color: #bf1d1a;">"DetailsViewController"</span> bundle<span style="padding: 0px; margin: 0px; color: #002200;">:</span><span style="padding: 0px; margin: 0px; color: #a61390;">nil</span><span style="padding: 0px; margin: 0px; color: #002200;">]</span>; <span style="padding: 0px; margin: 0px; color: #002200;">[</span>self.navigationController pushViewController<span style="padding: 0px; margin: 0px; color: #002200;">:</span>detailsViewController<span style="padding: 0px; margin: 0px; color: #002200;">]</span>; <span style="padding: 0px; margin: 0px; color: #002200;">[</span>detailsViewController release<span style="padding: 0px; margin: 0px; color: #002200;">]</span>; <span style="padding: 0px; margin: 0px; color: #002200;">}</span></pre> <ul class="tooltip" style="list-style-type: none; list-style-position: outside; list-style-image: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.5em; padding-top: 0px; padding-right: 0px; padding-bottom: 0.5em; padding-left: 0px; white-space: nowrap;"> 榪欓噷鏈変袱涓渶瑕佹敞鎰忕殑鍦版柟 </ul> <ul class="tooltip" style="list-style-type: none; list-style-position: outside; list-style-image: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.5em; padding-top: 0px; padding-right: 0px; padding-bottom: 0.5em; padding-left: 0px; white-space: nowrap;"> 1.榪涘叆涓嬩竴涓〉闈㈢殑鏃跺欙紝table涓殑閫夋嫨琛岃鍙栨秷銆? </ul> <ul class="tooltip" style="list-style-type: none; list-style-position: outside; list-style-image: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.5em; padding-top: 0px; padding-right: 0px; padding-bottom: 0.5em; padding-left: 0px; white-space: nowrap;"> 2.璁板緱release瑕乸ush鐨刢ontroller.鍥犱負瀵艱埅鏍堟槸retain鐨勩? </ul> <h1 style="font-size: 2em;"><span style="font-family: Verdana; font-size: 18pt; ">3.閰嶇疆Navigation bar</span><br /></h1> <p>鍙兘澶у鎯崇洿鎺ヨ闂畁avigationcontroller 鐨刵avigation bar銆備絾鏄氬父鎴戜滑涓嶈繖鏍峰仛銆傝屾槸緇存姢姣忎釜viewcontroller鐨?navigation item銆?/p> <p>榪欓噷涓嶈灝唍avigation item 涓?navigation bar 娣鋒穯錛宯avigation item涓嶆槸UIView鐨勫瓙綾匯傚畠鏄竴涓敤鏉ユ洿鏂皀avigtion bar鐨勫瓨鍌ㄤ俊鎭殑綾匯?/p> <p>榪樻槸涓婁唬鐮佽鏄?</p> <pre class="objc" style="padding: 0px; margin: 0px; width: auto; clear: none; overflow: visible; font-size: 12px; line-height: 1.333; white-space: pre; color: #110000; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; background-color: #f9f9f9; font-family: monospace;"><span style="padding: 0px; margin: 0px; color: #002200;">-</span> <span style="padding: 0px; margin: 0px; color: #002200;">(</span><span style="padding: 0px; margin: 0px; color: #a61390;">void</span><span style="padding: 0px; margin: 0px; color: #002200;">)</span>tableView<span style="padding: 0px; margin: 0px; color: #002200;">:</span><span style="padding: 0px; margin: 0px; color: #002200;">(</span>UITableView <span style="padding: 0px; margin: 0px; color: #002200;">*</span><span style="padding: 0px; margin: 0px; color: #002200;">)</span>tableView didSelectRowAtIndexPath<span style="padding: 0px; margin: 0px; color: #002200;">:</span><span style="padding: 0px; margin: 0px; color: #002200;">(</span><span style="padding: 0px; margin: 0px; color: #400080;">NSIndexPath</span> <span style="padding: 0px; margin: 0px; color: #002200;">*</span><span style="padding: 0px; margin: 0px; color: #002200;">)</span>indexPath <span style="padding: 0px; margin: 0px; color: #002200;">{</span> <span style="padding: 0px; margin: 0px; color: #002200;">[</span><span style="padding: 0px; margin: 0px; color: #002200;">[</span>tableView cellForRowAtIndexPath<span style="padding: 0px; margin: 0px; color: #002200;">:</span>indexPath<span style="padding: 0px; margin: 0px; color: #002200;">]</span> setSelected<span style="padding: 0px; margin: 0px; color: #002200;">:</span><span style="padding: 0px; margin: 0px; color: #a61390;">NO</span> animated<span style="padding: 0px; margin: 0px; color: #002200;">:</span><span style="padding: 0px; margin: 0px; color: #a61390;">YES</span><span style="padding: 0px; margin: 0px; color: #002200;">]</span>;   Person <span style="padding: 0px; margin: 0px; color: #002200;">*</span>person;   <span style="padding: 0px; margin: 0px; color: #11740a; font-style: italic;">// Some code that sets person based on the particular cell that was selected</span>   DetailsViewController <span style="padding: 0px; margin: 0px; color: #002200;">*</span>detailsViewController <span style="padding: 0px; margin: 0px; color: #002200;">=</span> <span style="padding: 0px; margin: 0px; color: #002200;">[</span><span style="padding: 0px; margin: 0px; color: #002200;">[</span>DetailsViewController alloc<span style="padding: 0px; margin: 0px; color: #002200;">]</span> initWithNibName<span style="padding: 0px; margin: 0px; color: #002200;">:</span><span style="padding: 0px; margin: 0px; color: #bf1d1a;">@</span><span style="padding: 0px; margin: 0px; color: #bf1d1a;">"DetailsViewController"</span> bundle<span style="padding: 0px; margin: 0px; color: #002200;">:</span><span style="padding: 0px; margin: 0px; color: #a61390;">nil</span><span style="padding: 0px; margin: 0px; color: #002200;">]</span>; detailsViewController.navigationItem.title <span style="padding: 0px; margin: 0px; color: #002200;">=</span> person.name; <span style="padding: 0px; margin: 0px; color: #002200;">[</span>self.navigationController pushViewController<span style="padding: 0px; margin: 0px; color: #002200;">:</span>detailsViewController<span style="padding: 0px; margin: 0px; color: #002200;">]</span>; <span style="padding: 0px; margin: 0px; color: #002200;">[</span>detailsViewController release<span style="padding: 0px; margin: 0px; color: #002200;">]</span>; <span style="padding: 0px; margin: 0px; color: #002200;">}</span></pre> <pre class="objc" style="width: auto; clear: none; overflow-x: visible; overflow-y: visible; font-size: 12px; line-height: 1.333; white-space: pre; color: #110000; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; background-color: #f9f9f9; font-family: monospace; padding: 0px; margin: 0px;">detailsViewController.navigationItem.title <span style="color: #002200; padding: 0px; margin: 0px;">=</span> person.name;榪欏彞璇濈殑鎰忔濆氨鏄妸浜岀駭鐣岄潰鐨勫鑸爣棰樿緗垚person.name</pre> <p>瑕佹敞鎰忎袱鐐?1.鎴戜滑騫舵病鏈夌洿鎺ユ搷浣渘avigation bar 2.鍦╬ush 鏂扮殑controller涔嬪墠璁劇疆鏍囬</p> <p>褰撴柊鐨刣etailcontroller琚玴ush鍚庯紝<span style="color: #222222; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Helvetica, Arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; background-color: #ffffff; display: inline !important; float: none;">UINavigationController</span>浼氳嚜鍔ㄦ洿鏂皀avigation bar銆?/p> <h1>4.榪斿洖鎸夐挳</h1> <p>榛樿鎯呭喌涓嬶紝褰撲綘灝嗕竴涓柊鐨剉iewcontroller鎺ㄥ叆鏍堢殑鏃跺欙紝榪斿洖鎸夐挳灝嗘樉紺哄墠涓涓〉闈㈢殑controller鐨?navigation item鐨則itle銆?/p> <p>濡傛灉鎯沖畾鍒惰繑鍥炴寜閽殑鏍囬榪樻湁浜嬩歡鐨勮瘽錛屽彲浠ョ敤浠ヤ笅浠g爜銆?/p> <pre class="objc" style="padding: 0px; margin: 0px; width: auto; clear: none; overflow: visible; font-size: 12px; line-height: 1.333; white-space: pre; color: #110000; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; background-color: #f9f9f9; font-family: monospace;">UIBarButtonItem <span style="padding: 0px; margin: 0px; color: #002200;">*</span>backButton <span style="padding: 0px; margin: 0px; color: #002200;">=</span> <span style="padding: 0px; margin: 0px; color: #002200;">[</span><span style="padding: 0px; margin: 0px; color: #002200;">[</span>UIBarButtonItem alloc<span style="padding: 0px; margin: 0px; color: #002200;">]</span> initWithTitle<span style="padding: 0px; margin: 0px; color: #002200;">:</span><span style="padding: 0px; margin: 0px; color: #bf1d1a;">@</span><span style="padding: 0px; margin: 0px; color: #bf1d1a;">"Back"</span> style<span style="padding: 0px; margin: 0px; color: #002200;">:</span>UIBarButtonItemStylePlain target<span style="padding: 0px; margin: 0px; color: #002200;">:</span><span style="padding: 0px; margin: 0px; color: #a61390;">nil</span> action<span style="padding: 0px; margin: 0px; color: #002200;">:</span><span style="padding: 0px; margin: 0px; color: #a61390;">nil</span><span style="padding: 0px; margin: 0px; color: #002200;">]</span>; self.navigationItem.backBarButtonItem <span style="padding: 0px; margin: 0px; color: #002200;">=</span> backButton; <span style="padding: 0px; margin: 0px; color: #002200;">[</span>backButton release<span style="padding: 0px; margin: 0px; color: #002200;">]</span>;</pre> <p>娉ㄦ剰錛岃繖閲岀殑self鏄涓綰х殑view controller銆傝繖鏍風殑璇濈浜岀駭鐨勯〉闈㈠皢鏄劇ず“Back”</p> <h1>5.宸﹀彸鎸夐挳</h1> <p>navigation item榪樻湁涓や釜灞炴eftBarButtonItem rightBarButtonItem銆?/p> <p>涓鑸琹eftBarButtonItem鍙嚭鐜板湪RootviewController涓嬌鐢紝鍥犱負鍏朵粬欏甸潰涓鑸兘鏄劇ず涓涓繑鍥炴寜閽?/p> <pre class="objc" style="padding: 0px; margin: 0px; width: auto; clear: none; overflow: visible; font-size: 12px; line-height: 1.333; white-space: pre; color: #110000; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; background-color: #f9f9f9; font-family: monospace;">UIBarButtonItem <span style="padding: 0px; margin: 0px; color: #002200;">*</span>settingsButton <span style="padding: 0px; margin: 0px; color: #002200;">=</span> <span style="padding: 0px; margin: 0px; color: #002200;">[</span><span style="padding: 0px; margin: 0px; color: #002200;">[</span>UIBarButtonItem alloc<span style="padding: 0px; margin: 0px; color: #002200;">]</span> initWithTitle<span style="padding: 0px; margin: 0px; color: #002200;">:</span><span style="padding: 0px; margin: 0px; color: #bf1d1a;">@</span><span style="padding: 0px; margin: 0px; color: #bf1d1a;">"Settings"</span> style<span style="padding: 0px; margin: 0px; color: #002200;">:</span>UIBarButtonItemStylePlain target<span style="padding: 0px; margin: 0px; color: #002200;">:</span>self action<span style="padding: 0px; margin: 0px; color: #002200;">:</span><span style="padding: 0px; margin: 0px; color: #a61390;">@selector</span><span style="padding: 0px; margin: 0px; color: #002200;">(</span>handleSettings<span style="padding: 0px; margin: 0px; color: #002200;">)</span><span style="padding: 0px; margin: 0px; color: #002200;">]</span>; self.navigationItem.rightBarButtonItem <span style="padding: 0px; margin: 0px; color: #002200;">=</span> settingsButton; <span style="padding: 0px; margin: 0px; color: #002200;">[</span>settingsButton release<span style="padding: 0px; margin: 0px; color: #002200;">]</span>;</pre> <p>榪欎細鍦ㄥ彸渚ф坊鍔犱竴涓?#8220;Setting”鐨勬寜閽紝騫惰Е鍙慼andleSetting浜嬩歡銆?/p> <h1>6.鍦ㄩ欏甸殣钘廚avigation Bar</h1> <pre class="objc" style="padding: 0px; margin: 0px; width: auto; clear: none; overflow: visible; font-size: 12px; line-height: 1.333; white-space: pre; color: #110000; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; background-color: #f9f9f9; font-family: monospace;">鍦≧ootViewController.m涓疄鐜板涓嬶細</pre> <pre class="objc" style="padding: 0px; margin: 0px; width: auto; clear: none; overflow: visible; font-size: 12px; line-height: 1.333; white-space: pre; color: #110000; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; background-color: #f9f9f9; font-family: monospace;"><br /></pre> <pre class="objc" style="padding: 0px; margin: 0px; width: auto; clear: none; overflow: visible; font-size: 12px; line-height: 1.333; white-space: pre; color: #110000; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; background-color: #f9f9f9; font-family: monospace;"><span style="padding: 0px; margin: 0px; color: #002200;">-</span> <span style="padding: 0px; margin: 0px; color: #002200;">(</span><span style="padding: 0px; margin: 0px; color: #a61390;">void</span><span style="padding: 0px; margin: 0px; color: #002200;">)</span>viewWillAppear<span style="padding: 0px; margin: 0px; color: #002200;">:</span><span style="padding: 0px; margin: 0px; color: #002200;">(</span><span style="padding: 0px; margin: 0px; color: #a61390;">BOOL</span><span style="padding: 0px; margin: 0px; color: #002200;">)</span>animated <span style="padding: 0px; margin: 0px; color: #002200;">{</span> <span style="padding: 0px; margin: 0px; color: #002200;">[</span>super viewWillAppear<span style="padding: 0px; margin: 0px; color: #002200;">:</span>animated<span style="padding: 0px; margin: 0px; color: #002200;">]</span>;   <span style="padding: 0px; margin: 0px; color: #002200;">[</span>self.navigationController setNavigationBarHidden<span style="padding: 0px; margin: 0px; color: #002200;">:</span><span style="padding: 0px; margin: 0px; color: #a61390;">YES</span> animated<span style="padding: 0px; margin: 0px; color: #002200;">:</span><span style="padding: 0px; margin: 0px; color: #a61390;">YES</span><span style="padding: 0px; margin: 0px; color: #002200;">]</span>; <span style="padding: 0px; margin: 0px; color: #002200;">}</span>   <span style="padding: 0px; margin: 0px; color: #002200;">-</span> <span style="padding: 0px; margin: 0px; color: #002200;">(</span><span style="padding: 0px; margin: 0px; color: #a61390;">void</span><span style="padding: 0px; margin: 0px; color: #002200;">)</span>viewWillDisappear<span style="padding: 0px; margin: 0px; color: #002200;">:</span><span style="padding: 0px; margin: 0px; color: #002200;">(</span><span style="padding: 0px; margin: 0px; color: #a61390;">BOOL</span><span style="padding: 0px; margin: 0px; color: #002200;">)</span>animated <span style="padding: 0px; margin: 0px; color: #002200;">{</span> <span style="padding: 0px; margin: 0px; color: #002200;">[</span>super viewWillDisappear<span style="padding: 0px; margin: 0px; color: #002200;">:</span>animated<span style="padding: 0px; margin: 0px; color: #002200;">]</span>;   <span style="padding: 0px; margin: 0px; color: #002200;">[</span>self.navigationController setNavigationBarHidden<span style="padding: 0px; margin: 0px; color: #002200;">:</span><span style="padding: 0px; margin: 0px; color: #a61390;">NO</span> animated<span style="padding: 0px; margin: 0px; color: #002200;">:</span><span style="padding: 0px; margin: 0px; color: #a61390;">YES</span><span style="padding: 0px; margin: 0px; color: #002200;">]</span>; <span style="padding: 0px; margin: 0px; color: #002200;">}</span></pre> <p>榪欑瘒鏂囩珷緲昏瘧鑷?a >http://www.iosdevnotes.com/2011/03/uinavigationcontroller-tutorial/</a></p> <p> </p> <p> </p><img src ="http://m.shnenglu.com/cokecoffe/aggbug/177341.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.shnenglu.com/cokecoffe/" target="_blank">Wangkeke</a> 2012-06-03 17:34 <a href="http://m.shnenglu.com/cokecoffe/archive/2012/06/03/177341.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>IOS5 JSONhttp://m.shnenglu.com/cokecoffe/archive/2012/06/02/177261.htmlWangkekeWangkekeSat, 02 Jun 2012 15:46:00 GMThttp://m.shnenglu.com/cokecoffe/archive/2012/06/02/177261.htmlhttp://m.shnenglu.com/cokecoffe/comments/177261.htmlhttp://m.shnenglu.com/cokecoffe/archive/2012/06/02/177261.html#Feedback0http://m.shnenglu.com/cokecoffe/comments/commentRss/177261.htmlhttp://m.shnenglu.com/cokecoffe/services/trackbacks/177261.htmlIOS5.0寮濮嬫敮鎸丣SON錛屾墍浠ヤ笉鐢ㄧ涓夋柟鐨勮В鏋愪簡銆?/span>

//灝?/span>Foundation(NSDictionary銆?/span>NSData) 杞崲涓?/span>JSon鏍煎紡鐨?/span>NSData 鐢ㄦ潵鍙戦?/span>

//+ dataWithJSONObject:options:error:

 

//灝?/span>JSON鏍煎紡鐨?/span>Data杞崲涓?/span>Foundation(NSDictionary銆?/span>NSData)   鐢ㄦ潵瑙f瀽

//+ JSONObjectWithData:options:error:

code:

https://github.com/cokecoffe/ios-demo/tree/master/HTTP

  1. 瑙f瀽json鎴恉ic瀵硅薄
  2. -(void)fetchedData:(NSData*)responseData {//parse out the json dataNSError* error;
  3. NSDictionary* json =[NSJSONSerialization
  4. JSONObjectWithData:responseData //1
  5. options:kNilOptions
  6. error:&error];
  7. NSArray* latestLoans =[json objectForKey:@"loans"]; //2
  8. NSLog(@"loans: %@", latestLoans); //3
  9. }
  10. 鎶婂璞$敓鎴恓son string
  11. //build an info object and convert to json
  12. NSDictionary* info =[NSDictionary dictionaryWithObjectsAndKeys:[loan objectForKey:@"name"],
  13. @"who",
  14. [(NSDictionary*)[loan objectForKey:@"location"]
  15. objectForKey:@"country"],
  16. @"where",
  17. [NSNumber numberWithFloat: outstandingAmount],
  18. @"what",
  19. nil];
  20. //convert object to data
  21. NSData* jsonData =[NSJSONSerialization dataWithJSONObject:info
  22. options:NSJSONWritingPrettyPrinted error:&error];
  23. //print out the data contents
  24. jsonSummary.text =[[NSString alloc] initWithData:jsonData
  25. encoding:NSUTF8StringEncoding];
  26. 娣誨姞json鏂規硶鑷砫ic
  27. @interfaceNSDictionary(JSONCategories)
  28. +(NSDictionary*)dictionaryWithContentsOfJSONURLString:(NSString*)urlAddress;
  29. -(NSData*)toJSON;
  30. @end
  31. @implementationNSDictionary(JSONCategories)
  32. +(NSDictionary*)dictionaryWithContentsOfJSONURLString:(NSString*)urlAddress{
  33. NSData* data =[NSData dataWithContentsOfURL:[NSURL URLWithString: urlAddress]];
  34. __autoreleasing NSError* error =nil;
  35. id result =[NSJSONSerialization JSONObjectWithData:data
  36. options:kNilOptions error:&error];
  37. if(error !=nil)returnnil;
  38. return result;
  39. }
  40. -(NSData*)toJSON{
  41. NSError* error =nil;
  42. id result =[NSJSONSerialization dataWithJSONObject:self
  43. options:kNilOptions error:&error];
  44. if(error !=nil)returnnil;
  45. return result;
  46. }@end
  47. 浣跨敤鍒楀瓙
  48. NSDictionary* myInfo =[NSDictionary dictionaryWithContentsOfJSONURLString:@"http://www.yahoo.com/news.json"];
  49. NSDictionary* information =[NSDictionary dictionaryWithObjectsAndKeys:@"orange",@"apple",@"banana",@"fig",nil];
  50. NSData* json =[information toJSON];
  51. 鍒ゆ柇鏄惁鍙痡son鍖?
  52. BOOL isTurnableToJSON =[NSJSONSerialization isValidJSONObject: object]


Wangkeke 2012-06-02 23:46 鍙戣〃璇勮
]]>
IOS涓婼QLite鐨勭畝鍗曚嬌鐢?/title><link>http://m.shnenglu.com/cokecoffe/archive/2012/05/31/176978.html</link><dc:creator>Wangkeke</dc:creator><author>Wangkeke</author><pubDate>Thu, 31 May 2012 15:37:00 GMT</pubDate><guid>http://m.shnenglu.com/cokecoffe/archive/2012/05/31/176978.html</guid><wfw:comment>http://m.shnenglu.com/cokecoffe/comments/176978.html</wfw:comment><comments>http://m.shnenglu.com/cokecoffe/archive/2012/05/31/176978.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.shnenglu.com/cokecoffe/comments/commentRss/176978.html</wfw:commentRss><trackback:ping>http://m.shnenglu.com/cokecoffe/services/trackbacks/176978.html</trackback:ping><description><![CDATA[<p>鐪嬬潃鍥藉緗戠珯鐨勬暀紼嬶紝鍐欎簡涓涓皬渚嬪瓙錛屼竴涓仈緋諱漢鐨勭▼搴忥紝鍖呮嫭 錛堝鍚嶃佸湴鍧銆佺數璇濓級涓夐」鍐呭錛岄氳繃涓や釜鎸夐挳錛屽彲浠ュ皢淇℃伅淇濆瓨鎴栬呮煡璇㈡暟鎹簱宸叉湁鐨勪俊鎭?/p> <p>UI灝變笉璇翠簡錛屾瘮杈冪畝鍗曘傝創涓涓嬪叧閿唬鐮侊紝鍏蜂綋鐨勮瘽榪樻槸鍘葷湅婧愪唬鐮?姝f兂鍔炴硶浼狅紝鎴戣繖git鍑虹偣闂)銆?/p> <p>聽</p> <p><strong>/*<span style="font: normal normal normal 11px/normal 'Heiti SC Light';">鏍規嵁璺緞鍒涘緩鏁版嵁搴撳茍鍒涘緩涓涓〃</span>contact(id nametext addresstext phonetext)*/</strong></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;">- (<span style="color: #103ffb;">void</span>)viewDidLoad</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;">{</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #3995ad;"><span style="color: #000000;"> [</span><span style="color: #103ffb;">super</span><span style="color: #000000;"> </span>viewDidLoad<span style="color: #000000;">];</span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #008d14;"><span style="color: #000000;"><span style="white-space: pre;"> </span></span>// Do any additional setup after loading the view, typically from a nib.</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;">聽</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;"><span style="color: #3995ad;"> NSString</span> *docsDir;</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;"><span style="color: #3995ad;"> NSArray</span> *dirPaths;</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;">聽</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #008d14;"><span style="color: #000000;"> </span>// Get the documents directory</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #3995ad;"><span style="color: #000000;"> dirPaths = </span>NSSearchPathForDirectoriesInDomains<span style="color: #000000;">(</span>NSDocumentDirectory<span style="color: #000000;">, </span>NSUserDomainMask<span style="color: #000000;">, </span><span style="color: #103ffb;">YES</span><span style="color: #000000;">);</span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;">聽</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;">docsDir = [dirPaths <span style="color: #3995ad;">objectAtIndex</span>:0];</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;">聽</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #008d14;"><span style="color: #000000;"> </span>// Build the path to the database file</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #3995ad;"><span style="color: #000000;"> </span> databasePath<span style="color: #000000;"> = [[</span>NSString<span style="color: #000000;"> </span>alloc<span style="color: #000000;">] </span>initWithString<span style="color: #000000;">: [docsDir </span>stringByAppendingPathComponent<span style="color: #000000;">: </span><span style="color: #b22822;">@"contacts.db"</span><span style="color: #000000;">]];</span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;">聽</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #3995ad;"><span style="color: #000000;"> </span> NSFileManager<span style="color: #000000;"> *filemgr = [</span>NSFileManager<span style="color: #000000;"> </span>defaultManager<span style="color: #000000;">];</span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;">聽</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #3995ad;"><span style="color: #000000;"> </span><span style="color: #103ffb;"> if</span><span style="color: #000000;"> ([filemgr </span>fileExistsAtPath<span style="color: #000000;">:</span>databasePath<span style="color: #000000;">] == </span><span style="color: #103ffb;">NO</span><span style="color: #000000;">) </span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;">{</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;"><span style="color: #103ffb;"> const</span> <span style="color: #103ffb;">char</span> *dbpath = [<span style="color: #3995ad;">databasePath</span> <span style="color: #3995ad;">UTF8String</span>];</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;"><span style="color: #103ffb;"> if</span> (<span style="color: #3995ad;">sqlite3_open</span>(dbpath, &<span style="color: #3995ad;">contactDB</span>)==<span style="color: #103ffb;">SQLITE_OK</span>)</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;">{</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;"><span style="color: #103ffb;"> char</span> *errMsg;</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #b22822;"><span style="color: #000000;"> </span><span style="color: #103ffb;"> const</span><span style="color: #000000;"> </span><span style="color: #103ffb;">char</span><span style="color: #000000;"> *sql_stmt = </span>"CREATE TABLE IF NOT EXISTS CONTACTS(ID INTEGER PRIMARY KEY AUTOINCREMENT, NAME TEXT, ADDRESS TEXT,PHONE TEXT)"<span style="color: #000000;">;</span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;"><span style="color: #103ffb;"> if</span> (<span style="color: #3995ad;">sqlite3_exec</span>(<span style="color: #3995ad;">contactDB</span>, sql_stmt, <span style="color: #103ffb;">NULL</span>, <span style="color: #103ffb;">NULL</span>, &errMsg)!=<span style="color: #103ffb;">SQLITE_OK</span>)</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;">{</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;"><span style="color: #3995ad;"> status</span>.<span style="color: #3995ad;">text</span> = <span style="color: #b22822;">@"</span><span style="font: 11.0px 'Heiti SC Light'; color: #b22822;">鍒涘緩琛ㄥけ璐?/span><span style="color: #b22822;">\n"</span>;</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;">}</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;">}</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;"><span style="color: #103ffb;"> else</span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;">{</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;"><span style="color: #3995ad;"> status</span>.<span style="color: #3995ad;">text</span> = <span style="color: #b22822;">@"</span><span style="font: 11.0px 'Heiti SC Light'; color: #b22822;">鍒涘緩</span><span style="color: #b22822;">/</span><span style="font: 11.0px 'Heiti SC Light'; color: #b22822;">鎵撳紑鏁版嵁搴撳け璐?/span><span style="color: #b22822;">"</span>;</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;">}</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;">}</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;">聽</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;">}</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;">聽</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;"><strong>/*灝嗘暟鎹繚瀛樺彧鏁版嵁搴擄紝褰撴寜涓嬩繚瀛樻寜閽殑鏃跺?/</strong></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;">聽</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;">- (<span style="color: #103ffb;">IBAction</span>)SaveToDataBase:(<span style="color: #103ffb;">id</span>)sender</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;">{</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;"><span style="color: #3995ad;">sqlite3_stmt</span> *statement;</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;">聽</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #3995ad;"><span style="color: #000000;"> </span><span style="color: #103ffb;">const</span><span style="color: #000000;"> </span><span style="color: #103ffb;">char</span><span style="color: #000000;"> *dbpath = [</span>databasePath<span style="color: #000000;"> </span>UTF8String<span style="color: #000000;">];</span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;">聽</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;"><span style="color: #103ffb;">if</span> (<span style="color: #3995ad;">sqlite3_open</span>(dbpath, &<span style="color: #3995ad;">contactDB</span>)==<span style="color: #103ffb;">SQLITE_OK</span>) {</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #b22822;"><span style="color: #000000;"> </span><span style="color: #3995ad;">NSString</span><span style="color: #000000;"> *insertSQL = [</span><span style="color: #3995ad;">NSString</span><span style="color: #000000;"> </span><span style="color: #3995ad;">stringWithFormat</span><span style="color: #000000;">:</span>@"INSERT INTO CONTACTS (name,address,phone) VALUES(\"%@\",\"%@\",\"%@\")"<span style="color: #000000;">,</span><span style="color: #3995ad;">name</span><span style="color: #000000;">.</span><span style="color: #3995ad;">text</span><span style="color: #000000;">,</span><span style="color: #3995ad;">address</span><span style="color: #000000;">.</span><span style="color: #3995ad;">text</span><span style="color: #000000;">,</span><span style="color: #3995ad;">phone</span><span style="color: #000000;">.</span><span style="color: #3995ad;">text</span><span style="color: #000000;">];</span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;"><span style="color: #103ffb;">const</span> <span style="color: #103ffb;">char</span> *insert_stmt = [insertSQL <span style="color: #3995ad;">UTF8String</span>];</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;"><span style="color: #3995ad;">sqlite3_prepare_v2</span>(<span style="color: #3995ad;">contactDB</span>, insert_stmt, -1, &statement, <span style="color: #103ffb;">NULL</span>);</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;"><span style="color: #103ffb;">if</span> (<span style="color: #3995ad;">sqlite3_step</span>(statement)==<span style="color: #103ffb;">SQLITE_DONE</span>) {</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;"><span style="color: #3995ad;">status</span>.<span style="color: #3995ad;">text</span> = <span style="color: #b22822;">@"</span><span style="font: 11.0px 'Heiti SC Light'; color: #b22822;">宸插瓨鍌ㄥ埌鏁版嵁搴?/span><span style="color: #b22822;">"</span>;</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;"><span style="color: #3995ad;">name</span>.<span style="color: #3995ad;">text</span> = <span style="color: #b22822;">@""</span>;</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;"><span style="color: #3995ad;">address</span>.<span style="color: #3995ad;">text</span> = <span style="color: #b22822;">@""</span>;</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;"><span style="color: #3995ad;">phone</span>.<span style="color: #3995ad;">text</span> = <span style="color: #b22822;">@""</span>;</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;">}</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;"><span style="color: #103ffb;">else</span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;">{</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;"><span style="color: #3995ad;">status</span>.<span style="color: #3995ad;">text</span> = <span style="color: #b22822;">@"</span><span style="font: 11.0px 'Heiti SC Light'; color: #b22822;">淇濆瓨澶辮觸</span><span style="color: #b22822;">"</span>;</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;">}</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;"><span style="color: #3995ad;">sqlite3_finalize</span>(statement);</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #3995ad;"><span style="color: #000000;"> </span>sqlite3_close<span style="color: #000000;">(</span>contactDB<span style="color: #000000;">);</span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;">}</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;">}</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;">聽</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;"><strong>/*鏍規嵁杈撳叆鐨勫鍚嶆潵鏌ヨ鏁版嵁*/</strong></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;">- (<span style="color: #103ffb;">IBAction</span>)SearchFromDataBase:(<span style="color: #103ffb;">id</span>)sender</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;">{</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #3995ad;"><span style="color: #000000;"> </span><span style="color: #103ffb;">const</span><span style="color: #000000;"> </span><span style="color: #103ffb;">char</span><span style="color: #000000;"> *dbpath = [</span>databasePath<span style="color: #000000;"> </span>UTF8String<span style="color: #000000;">];</span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;"><span style="color: #3995ad;">sqlite3_stmt</span> *statement;</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;">聽</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;"><span style="color: #103ffb;">if</span> (<span style="color: #3995ad;">sqlite3_open</span>(dbpath, &<span style="color: #3995ad;">contactDB</span>) == <span style="color: #103ffb;">SQLITE_OK</span>)</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;">{</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #b22822;"><span style="color: #000000;"> </span><span style="color: #3995ad;">NSString</span><span style="color: #000000;"> *querySQL = [</span><span style="color: #3995ad;">NSString</span><span style="color: #000000;"> </span><span style="color: #3995ad;">stringWithFormat</span><span style="color: #000000;">:</span>@"SELECT address,phone from contacts where name=\"%@\""<span style="color: #000000;">,</span><span style="color: #3995ad;">name</span><span style="color: #000000;">.</span><span style="color: #3995ad;">text</span><span style="color: #000000;">];</span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;"><span style="color: #103ffb;">const</span> <span style="color: #103ffb;">char</span> *query_stmt = [querySQL <span style="color: #3995ad;">UTF8String</span>];</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;"><span style="color: #103ffb;">if</span> (<span style="color: #3995ad;">sqlite3_prepare_v2</span>(<span style="color: #3995ad;">contactDB</span>, query_stmt, -1, &statement, <span style="color: #103ffb;">NULL</span>) == <span style="color: #103ffb;">SQLITE_OK</span>)</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;">{</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;"><span style="color: #103ffb;">if</span> (<span style="color: #3995ad;">sqlite3_step</span>(statement) == <span style="color: #103ffb;">SQLITE_ROW</span>)</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;">{</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;"><span style="color: #3995ad;">NSString</span> *addressField = [[<span style="color: #3995ad;">NSString</span> <span style="color: #3995ad;">alloc</span>] <span style="color: #3995ad;">initWithUTF8String</span>:(<span style="color: #103ffb;">const</span> <span style="color: #103ffb;">char</span> *)<span style="color: #3995ad;">sqlite3_column_text</span>(statement, 0)];</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;"><span style="color: #3995ad;">address</span>.<span style="color: #3995ad;">text</span> = addressField;</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;">聽</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;"><span style="color: #3995ad;">NSString</span> *phoneField = [[<span style="color: #3995ad;">NSString</span> <span style="color: #3995ad;">alloc</span>] <span style="color: #3995ad;">initWithUTF8String</span>:(<span style="color: #103ffb;">const</span> <span style="color: #103ffb;">char</span> *)<span style="color: #3995ad;">sqlite3_column_text</span>(statement, 1聽 聽 )];</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;"><span style="color: #3995ad;">phone</span>.<span style="color: #3995ad;">text</span> = phoneField;</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;">聽</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;"><span style="color: #3995ad;">status</span>.<span style="color: #3995ad;">text</span> = <span style="color: #b22822;">@"</span><span style="font: 11.0px 'Heiti SC Light'; color: #b22822;">宸叉煡鍒扮粨鏋?/span><span style="color: #b22822;">"</span>;</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;">[addressField <span style="color: #3995ad;">release</span>];</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;">[phoneField <span style="color: #3995ad;">release</span>];</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;">}</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;"><span style="color: #103ffb;">else</span> {</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;"><span style="color: #3995ad;">status</span>.<span style="color: #3995ad;">text</span> = <span style="color: #b22822;">@"</span><span style="font: 11.0px 'Heiti SC Light'; color: #b22822;">鏈煡鍒扮粨鏋?/span><span style="color: #b22822;">"</span>;</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;"><span style="color: #3995ad;">address</span>.<span style="color: #3995ad;">text</span> = <span style="color: #b22822;">@""</span>;</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;"><span style="color: #3995ad;">phone</span>.<span style="color: #3995ad;">text</span> = <span style="color: #b22822;">@""</span>;</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;">}</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;"><span style="color: #3995ad;">sqlite3_finalize</span>(statement);</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;">}</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;">聽</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #3995ad;"><span style="color: #000000;"> </span>sqlite3_close<span style="color: #000000;">(</span>contactDB<span style="color: #000000;">);</span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;">}</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;">}</p><img src ="http://m.shnenglu.com/cokecoffe/aggbug/176978.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.shnenglu.com/cokecoffe/" target="_blank">Wangkeke</a> 2012-05-31 23:37 <a href="http://m.shnenglu.com/cokecoffe/archive/2012/05/31/176978.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>IOS block 鏁欑▼http://m.shnenglu.com/cokecoffe/archive/2012/05/31/176920.htmlWangkekeWangkekeThu, 31 May 2012 05:47:00 GMThttp://m.shnenglu.com/cokecoffe/archive/2012/05/31/176920.htmlhttp://m.shnenglu.com/cokecoffe/comments/176920.htmlhttp://m.shnenglu.com/cokecoffe/archive/2012/05/31/176920.html#Feedback1http://m.shnenglu.com/cokecoffe/comments/commentRss/176920.htmlhttp://m.shnenglu.com/cokecoffe/services/trackbacks/176920.html闃呰鍏ㄦ枃

Wangkeke 2012-05-31 13:47 鍙戣〃璇勮
]]>
澶氱戶鎵?/title><link>http://m.shnenglu.com/cokecoffe/archive/2012/05/23/175943.html</link><dc:creator>Wangkeke</dc:creator><author>Wangkeke</author><pubDate>Wed, 23 May 2012 14:51:00 GMT</pubDate><guid>http://m.shnenglu.com/cokecoffe/archive/2012/05/23/175943.html</guid><wfw:comment>http://m.shnenglu.com/cokecoffe/comments/175943.html</wfw:comment><comments>http://m.shnenglu.com/cokecoffe/archive/2012/05/23/175943.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.shnenglu.com/cokecoffe/comments/commentRss/175943.html</wfw:commentRss><trackback:ping>http://m.shnenglu.com/cokecoffe/services/trackbacks/175943.html</trackback:ping><description><![CDATA[<p><span style="font-family: 'Hiragino Sans GB'; font-size: 13px;">Objective-C涓嶆敮鎸佸閲嶇戶鎵匡紝浣嗘槸鎴戜滑鏈夋柟娉曞疄鐜頒吉緇ф壙.</span></p> <p><span style="font-family: 'Hiragino Sans GB'; font-size: 13px;">涓句釜渚嬪瓙錛屽姞鍏ュ璞鏃犳硶澶勭悊娑堟伅fun錛岃屽璞鍙互澶勭悊錛屾鏃禔宸茬粡緇ф壙浜庣被C錛屾墍浠ユ鏃禔涓嶈兘鍐嶇戶鎵緽銆傛垜浠彲浠ョ敤娑堟伅杞彂鐨勬柟寮忥紝鏉ュ皢娑堟伅杞彂緇欒兘澶熷鐞唂un娑堟伅鐨勫璞銆?/span></p> <p><span style="font-family: 'Hiragino Sans GB'; font-size: 13px;">褰撶劧鍙互榪欎箞瀹炵幇</span></p> <table style="width: 763px; background-color: #f1f5f9; border-collapse: collapse; border: 1px solid #c9d1d7; padding-bottom: 4px; color: #000000; font-family: 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" cellspacing="0" cellpadding="6" width="100%" bgcolor="#F1F5F9"> <tbody> <tr style="border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: #ffffff;"> <td style="padding: 0.5em;" scope="row"> <pre style="margin: -0.083em 0.333em 0px 0.5em; font-size: 12px; font-family: Courier, Consolas, monospace; color: #666666; line-height: 13px; white-space: pre-wrap;"><p><span style="font-family: Monaco; font-size: 12px;">1 A: </span></p><p><span style="font-family: Monaco; font-size: 12px;">2 -fun </span></p><p><span style="font-family: Monaco; font-size: 12px;">3 { </span></p><p><span style="font-family: Monaco; font-size: 12px;">4 聽 聽 聽 聽 if([B respondTo:@selector(fun)]) </span></p><p><span style="font-family: Monaco; font-size: 12px;">5 聽 聽 聽 聽 { </span></p><p><span style="font-family: Monaco; font-size: 12px;">6 聽 聽 聽 聽 聽 聽 聽 聽 return [B fun]; </span></p><p><span style="font-family: Monaco; font-size: 12px;">7 聽 聽 聽 聽 } </span></p><p><span style="font-family: Monaco; font-size: 12px;">8 聽 聽 聽 聽 return self; </span></p><p><span style="font-family: Monaco; font-size: 12px;">9 } </span></p></pre> </td> </tr> </tbody> </table> <p><span style="font-family: 'Hiragino Sans GB'; font-size: 13px;">榪欐牱綆鍗曠殑灝嗘秷鎭漿鍙戝嚭鍘伙紝浣嗘槸姝ゆ柟寮忔瑺濡ワ紝鐗瑰埆鏄綋寰堝娑堟伅閮借A鏉ュ鐞嗭紝浣嗘槸A鍙堟棤娉曞鐞嗙殑鏃跺欙紝浣犻渶瑕佸疄鐜板悇縐峟un鏉ユ彁渚涙瘡涓縐嶆柟娉曞鐞嗘柟寮忋傚茍涓斿綋鍐欎笅浠g爜鐨勬椂鍊欙紝鎵鑳藉鐞嗙殑娑堟伅闆嗗悎涔熷氨蹇呴』紜畾涓嬫潵錛屼篃灝辨槸璇存槸闈欐佺殑銆?/span></p> <p><span style="font-family: 'Hiragino Sans GB'; font-size: 13px;">鏈変竴縐嶈В鍐蟲柟妗堝彲浠ヨВ鍐蟲闂<em> : </em><span style="color: #666666; font-variant: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; background-color: #ffffff; display: inline !important; float: none; font-family: 'Hiragino Sans GB'; font-size: 13px;"><strong>forwardInvocation</strong>錛氭柟娉曪紝姝ゆ柟娉曠戶鎵夸笌NSObject銆備笉榪嘚SObject涓鏂規硶鐨勫疄鐜幫紝鍙槸綆鍗曠殑璋冪敤浜?span style="color: #666666; font-variant: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; background-color: #ffffff; display: inline !important; float: none;">doesNotRecognizeSelector:</span></span></span></p> <p><span style="font-family: 'Hiragino Sans GB'; font-size: 13px;"><span style="color: #666666; font-variant: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; background-color: #ffffff; display: inline !important; float: none; font-family: 'Hiragino Sans GB'; font-size: 13px;"><span style="color: #666666; font-variant: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; background-color: #ffffff; display: inline !important; float: none;">鎴戜滑瑕佸仛鐨勬槸閲嶅啓闇瑕佽漿鍙戞秷鎭殑綾籄鐨?span style="color: #666666; font-variant: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; background-color: #ffffff; display: inline !important; font-family: 'Hiragino Sans GB'; font-size: 13px;">forwardInvocation鏂規硶錛屼互瀹炵幇灝嗘秷鎭漿鍙戠粰鑳藉鐞唂un娑堟伅鐨勫璞°?/span></span></span></span></p> <table style="width: 763px; background-color: #f1f5f9; border-collapse: collapse; border: 1px solid #c9d1d7; padding-bottom: 4px; color: #000000; font-family: 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" cellspacing="0" cellpadding="6" width="100%" bgcolor="#F1F5F9"> <tbody> <tr style="border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: #ffffff;"> <td style="padding: 0.5em;" scope="row"> <pre style="margin: -0.083em 0.333em 0px 0.5em; font-size: 12px; font-family: Courier, Consolas, monospace; color: #666666; line-height: 13px; white-space: pre-wrap;">- (void)forwardInvocation:(NSInvocation *)anInvocation</pre> </td> </tr> <tr style="border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: #ffffff;"> <td style="padding: 0.5em;" scope="row"> <pre style="margin: -0.083em 0.333em 0px 0.5em; font-size: 12px; font-family: Courier, Consolas, monospace; color: #666666; line-height: 13px; white-space: pre-wrap;">{</pre> </td> </tr> <tr style="border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: #ffffff;"> <td style="padding: 0.5em;" scope="row"> <pre style="margin: -0.083em 0.333em 0px 0.5em; font-size: 12px; font-family: Courier, Consolas, monospace; color: #666666; line-height: 13px; white-space: pre-wrap;"> if ([B respondsToSelector:[anInvocation selector])</pre> </td> </tr> <tr style="border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: #ffffff;"> <td style="padding: 0.5em;" scope="row"> <pre style="margin: -0.083em 0.333em 0px 0.5em; font-size: 12px; font-family: Courier, Consolas, monospace; color: #666666; line-height: 13px; white-space: pre-wrap;"> [anInvocation B];</pre> </td> </tr> <tr style="border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: #ffffff;"> <td style="padding: 0.5em;" scope="row"> <pre style="margin: -0.083em 0.333em 0px 0.5em; font-size: 12px; font-family: Courier, Consolas, monospace; color: #666666; line-height: 13px; white-space: pre-wrap;"> else</pre> </td> </tr> <tr style="border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: #ffffff;"> <td style="padding: 0.5em;" scope="row"> <pre style="margin: -0.083em 0.333em 0px 0.5em; font-size: 12px; font-family: Courier, Consolas, monospace; color: #666666; line-height: 13px; white-space: pre-wrap;"> [super forwardInvocation:anInvocation];</pre> </td> </tr> <tr style="border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: #ffffff;"> <td style="padding: 0.5em;" scope="row"> <pre style="margin: -0.083em 0.333em 0px 0.5em; font-size: 12px; font-family: Courier, Consolas, monospace; color: #666666; line-height: 13px; white-space: pre-wrap;">}</pre> </td> </tr> </tbody> </table> <p><span style="font-family: 'Hiragino Sans GB'; font-size: 13px;"><span style="color: #666666; font-family: Courier, Consolas, monospace;">榪樻湁鍏抽敭涓姝ワ紝鏄噸鍐?span style="color: #000000; font-family: Arial; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 26px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; background-color: #ffffff; display: inline !important; float: none;">methodSignatureForSelector鏂規硶錛屾鏂規硶鏄湪鍚戝璞″彂閫佷笉鑳藉鐞嗙殑娑堟伅鐨勬椂鍊欒皟鐢ㄧ殑錛屾鏂規硶鍙垽鏂秷鎭痜un鏄惁鏈夋晥娉ㄥ唽銆傚鏋滄敞鍐岃繃fun錛岄偅涔堝垯榪斿洖fun娑堟伅鐨勫湴鍧涔嬬被鐨勪俊鎭紝濡傛灉鏃犳晥鍒欒繑鍥瀗il錛岄偅涔堝氨crash鎺夈傛墍浠ユ垜浠鎶奻un娑堟伅娉ㄥ唽涓轟竴涓湁鏁堢殑銆?/span></span></span></p> <table style="cursor: default; width: 763px; background-color: #f1f5f9; border-collapse: collapse; padding-bottom: 4px; color: #000000; font-family: 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; border: 1px solid #c9d1d7;" cellspacing="0" cellpadding="6" width="100%" bgcolor="#F1F5F9"> <tbody> <tr style="border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: #ffffff;"> <td style="cursor: text; padding: 0.5em; margin: 8px; border: 1px dashed #bbbbbb;" scope="row"> <pre style="margin-top: -0.083em; margin-right: 0.333em; margin-bottom: 0px; margin-left: 0.5em; font-size: 12px; font-family: Courier, Consolas, monospace; color: #666666; line-height: 13px; white-space: pre-wrap;"><span style="color: #666666;"><span style="line-height: 13px;"> </span></span><pre style="white-space: pre-wrap; word-wrap: break-word; font-size: 12px; font-family: 'Courier New'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; padding: 0px; margin: 0px;"><span style="color: #008080;"><span style="line-height: 18px;"><pre style="margin: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word; font-size: 12px; font-family: 'Courier New'; color: #393939; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 21px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"><span style="margin: 0px; padding: 0px; font-family: 'Courier New'; font-size: 12px; line-height: 1.5; color: #008080;">1</span> - (NSMethodSignature*)methodSignatureForSelector:(SEL)selector<br style="margin: 0px; padding: 0px;" /><span style="margin: 0px; padding: 0px; font-family: 'Courier New'; font-size: 12px; line-height: 1.5; color: #008080;">2</span> {<br style="margin: 0px; padding: 0px;" /><span style="margin: 0px; padding: 0px; font-family: 'Courier New'; font-size: 12px; line-height: 1.5; color: #008080;">3</span> NSMethodSignature* signature = [super methodSignatureForSelector:selector];<br style="margin: 0px; padding: 0px;" /><span style="margin: 0px; padding: 0px; font-family: 'Courier New'; font-size: 12px; line-height: 1.5; color: #008080;">4</span> <br style="margin: 0px; padding: 0px;" /><span style="margin: 0px; padding: 0px; font-family: 'Courier New'; font-size: 12px; line-height: 1.5; color: #008080;">5</span> <span style="margin: 0px; padding: 0px; font-family: 'Courier New'; font-size: 12px; line-height: 1.5; color: #0000ff;">if</span> (!signature)//濡傛灉鐖剁被涓棤娉ㄥ唽fun娑堟伅錛岄偅涔堝皢B娉ㄥ唽<br style="margin: 0px; padding: 0px;" /><span style="margin: 0px; padding: 0px; font-family: 'Courier New'; font-size: 12px; line-height: 1.5; color: #008080;">6</span> signature = [B methodSignatureForSelector:selector];<br style="margin: 0px; padding: 0px;" /><span style="margin: 0px; padding: 0px; font-family: 'Courier New'; font-size: 12px; line-height: 1.5; color: #008080;">7</span> <br style="margin: 0px; padding: 0px;" /><span style="margin: 0px; padding: 0px; font-family: 'Courier New'; font-size: 12px; line-height: 1.5; color: #008080;">8</span> <span style="margin: 0px; padding: 0px; font-family: 'Courier New'; font-size: 12px; line-height: 1.5; color: #0000ff;">return</span> signature;<br style="margin: 0px; padding: 0px;" /><span style="margin: 0px; padding: 0px; font-family: 'Courier New'; font-size: 12px; line-height: 1.5; color: #008080;">9</span> }</pre> <br /></span></span></pre> </pre> </td> </tr> </tbody> </table> <p>榪欐牱涓鏉ワ紝娑堟伅fun灝嗚杞彂鑷矪銆?/p> <p>鎴戜滑鏉ヨ涓涓嬪悜涓涓璞″彂閫佹秷鎭悗錛岀郴緇熺殑澶勭悊嫻佺▼</p> <p>1.棣栧厛鍙戦佹秷鎭痆A fun];</p> <p>2.緋葷粺浼氭鏌鑳藉惁鍝嶅簲榪欎釜fun娑堟伅錛屽鏋滆兘鍝嶅簲鍒橝鍝嶅簲</p> <p>3.濡傛灉涓嶈兘鍝嶅簲錛屽垯璋冪敤methodSignatureForSelector:鏉ヨ闂繖涓秷鎭槸鍚︽湁鏁堬紝鍖呮嫭鍘葷埗綾諱腑璇㈤棶銆?/p> <p>4.鎺ョ潃璋冪敤forwardInvocation:姝ゆ椂姝ラ涓夎繑鍥瀗il鎴栬呭彲浠ュ鐞嗘秷鎭殑娑堟伅鍦板潃銆傚鏋渘il鍒檆rash錛屽鏋滄湁鍙互澶勭悊fun娑堟伅鐨勫湴鍧錛岄偅涔堣漿鍙戞垚鍔熴?/p> <p>聽</p> <p>聽</p><img src ="http://m.shnenglu.com/cokecoffe/aggbug/175943.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.shnenglu.com/cokecoffe/" target="_blank">Wangkeke</a> 2012-05-23 22:51 <a href="http://m.shnenglu.com/cokecoffe/archive/2012/05/23/175943.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>鐣岄潰鏋勫緩http://m.shnenglu.com/cokecoffe/archive/2012/05/05/173756.htmlWangkekeWangkekeSat, 05 May 2012 09:30:00 GMThttp://m.shnenglu.com/cokecoffe/archive/2012/05/05/173756.htmlhttp://m.shnenglu.com/cokecoffe/comments/173756.htmlhttp://m.shnenglu.com/cokecoffe/archive/2012/05/05/173756.html#Feedback0http://m.shnenglu.com/cokecoffe/comments/commentRss/173756.htmlhttp://m.shnenglu.com/cokecoffe/services/trackbacks/173756.html涓夌鏂規硶

1.Interface Buider

2.鐢ㄤ唬鐮佸疄鐜板湪loadview涓?/p>

3.loadview涓姞杞絰ib鏂囦歡錛屽皢瀵硅薄瑙f瀽



Wangkeke 2012-05-05 17:30 鍙戣〃璇勮
]]>
Objective-C 鍗忚 綆浠?+濮旀墭鐨勫疄鐜?/title><link>http://m.shnenglu.com/cokecoffe/archive/2012/05/05/173717.html</link><dc:creator>Wangkeke</dc:creator><author>Wangkeke</author><pubDate>Sat, 05 May 2012 02:57:00 GMT</pubDate><guid>http://m.shnenglu.com/cokecoffe/archive/2012/05/05/173717.html</guid><wfw:comment>http://m.shnenglu.com/cokecoffe/comments/173717.html</wfw:comment><comments>http://m.shnenglu.com/cokecoffe/archive/2012/05/05/173717.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://m.shnenglu.com/cokecoffe/comments/commentRss/173717.html</wfw:commentRss><trackback:ping>http://m.shnenglu.com/cokecoffe/services/trackbacks/173717.html</trackback:ping><description><![CDATA[<p><span style="text-decoration: underline;">綆鍗曠殑浠嬬粛</span></p> <p><strong>1.1瀹氫箟鍗忚: </strong></p> <p>鍒涘緩涓涓?h鏂囦歡</p> <pre style="background-color: #fbfbfb; min-height: 40px; width: 650px; overflow: auto; border: #cecece 1px solid; padding: 5px;"><pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 1: _MyProtocolName.h</pre> <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 2: @protocol MyProtocolName <NSObject> </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"><br /></pre><pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 3: @end </pre></pre> <p>娉?鍗忚涓病鏈夊彉閲?</p> <p><NSObject>鏄唬琛ㄥ湪姝ゅ0鏄庣殑鍗忚鏄疦SObject鍗忚鐨勮鐢熷崗璁紙涓嶆槸NSObject綾?;</p> <p><strong>1.2浣跨敤鍗忚: </strong></p> <pre style="background-color: #fbfbfb; min-height: 40px; width: 650px; overflow: auto; border: #cecece 1px solid; padding: 5px;"><pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 1: @interface CustomView:UIView<MyProtocolName> </pre> </pre> <p>浠h〃CustomView閬靛驚鎴戜滑鍒跺畾鐨勮繖涓崗璁紝闇瑕佸疄鐜板崗璁殑鏂規硶</p> <p><strong>1.3鐢ㄥ崗璁慨楗板彉閲? </strong></p> <p>濡傛灉榪欐牱瀹氫箟涓涓彉閲?</p> <pre style="background-color: #fbfbfb; min-height: 40px; width: 657px; height: 31px; overflow: auto; border: #cecece 1px solid; padding: 5px;"><pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 1: id<MyProtocolName>myNewVariable;</pre> </pre> <p>閭d箞myNewVaiable鏄伒寰垜浠埗瀹氱殑榪欎釜MyProtocolName鍗忚鐨?/p> <p> </p> <p>濡傛灉瀹氫箟鍑芥暟鏃?</p> <pre style="background-color: #fbfbfb; min-height: 40px; width: 657px; height: 33px; overflow: auto; border: #cecece 1px solid; padding: 5px;"><pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px;"> 1: - (<span style="color: #0000ff;">void</span>) doSomethingWithThisObject: (id<MyProtocolName>) aObject</pre> </pre> <p>閭d箞榪欎釜鍑芥暟鐨勫弬鏁版槸闇瑕侀伒寰垜浠埗瀹氱殑榪欎釜MyProtocolName鍗忚鐨?/p> <p> </p> <p>============鎺ヤ笅鏉ョ湅涓嬪浣曞埄鐢ㄥ崗璁疄鐜板鎵?========</p> <p>鐩殑錛氬皢A鐨勪簨鎯呭鎵樼粰B鏉ュ仛<br /> 姝ラ1.鍦ˋ涓0鏄庡崗璁紝鍗寵濮旀墭鍑哄幓鐨勪簨鎯咃紙鏂規硶錛夈?br /> 姝ラ2.A涓0鏄庝竴涓鎵樺璞★紝鍗寵濮旀墭緇欒皝鍘誨姙錛岀敤id<鍗忚鍚嶅瓧>濮旀墭瀵硅薄鍚嶏紱<br /> 姝ラ3.姣斿鎯寵B鍋欰鐨勪簨鎯咃紝閭d箞B鐨刬nterface涓瀹e竷鑷繁閬靛驚A涓埗瀹氱殑閭d釜鍗忚銆?br /> 姝ラ4.A璋冪敤濮旀墭鎵ц閭d歡浜嬫儏鍘?鍗砙delegate fun]<br /><br /></p> <p><span style="text-decoration: underline;"><strong>A.h------------------------------------------------</strong></span></p> <p>@protocol Mydelegate//鍗忚鐨勫0鏄?/p> <p>-(void)Fun;</p> <p>@end</p> <p> </p> <p>@interface A:NSObject</p> <p>{</p> <p>   id<Mydelegate> delegate;//澹版槑涓涓鎵樺璞★紝鎴戜滑瑕佹妸浜嬫儏濮旀墭緇欏疄鐜癕ydelegate鍗忚鐨勭被</p> <p>}</p> <p>@property(assign,nonatomic) id<Mydelegate> delegate;</p> <p>@end</p> <p><span style="text-decoration: underline;"><strong>A.m---------------------------------------------</strong></span></p> <p>@implementation</p> <p>-(void)init</p> <p>{</p> <p>    delegate = B;</p> <p>}</p> <p>-(void)FunToOther</p> <p>{</p> <p>    [delegate Fun];//灝嗘秷鎭彂閫佺粰濮旀墭鍘誨鐞?/p> <p>}</p> <p>@end</p> <p> </p> <p>濮旀墭瀵硅薄鐨勫疄鐜?/p> <p><strong>B.h---------------------------------------------</strong></p> <p>#import"A.h"</p> <p>@interface B:NSObject<MyDelegate></p> <p>@end</p> <p><strong>B.m</strong><strong>---------------------------------------------</strong></p> <p>@implementation</p> <p>-(void)fun</p> <p>{</p> <p>    //瀹炵幇Mydelegate涓埗瀹氱殑鏂規硶</p> <p>}</p> <p>@end</p> <p>榪欐牱鐨勮瘽A灝卞彲浠ュ鎵楤鍘誨仛fun榪欎歡浜嬫儏浜嗐?/p><img src ="http://m.shnenglu.com/cokecoffe/aggbug/173717.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.shnenglu.com/cokecoffe/" target="_blank">Wangkeke</a> 2012-05-05 10:57 <a href="http://m.shnenglu.com/cokecoffe/archive/2012/05/05/173717.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Objective-C涓鎵樺拰鍗忚http://m.shnenglu.com/cokecoffe/archive/2012/04/25/172777.htmlWangkekeWangkekeWed, 25 Apr 2012 15:18:00 GMThttp://m.shnenglu.com/cokecoffe/archive/2012/04/25/172777.htmlhttp://m.shnenglu.com/cokecoffe/comments/172777.htmlhttp://m.shnenglu.com/cokecoffe/archive/2012/04/25/172777.html#Feedback0http://m.shnenglu.com/cokecoffe/comments/commentRss/172777.htmlhttp://m.shnenglu.com/cokecoffe/services/trackbacks/172777.html闃呰鍏ㄦ枃

Wangkeke 2012-04-25 23:18 鍙戣〃璇勮
]]>
Foundation Kithttp://m.shnenglu.com/cokecoffe/archive/2012/04/22/172345.htmlWangkekeWangkekeSun, 22 Apr 2012 08:58:00 GMThttp://m.shnenglu.com/cokecoffe/archive/2012/04/22/172345.htmlhttp://m.shnenglu.com/cokecoffe/comments/172345.htmlhttp://m.shnenglu.com/cokecoffe/archive/2012/04/22/172345.html#Feedback0http://m.shnenglu.com/cokecoffe/comments/commentRss/172345.htmlhttp://m.shnenglu.com/cokecoffe/services/trackbacks/172345.html1.NSRange
   1:  typedef struct _NSRange
   2:   
   3:  {
   4:   
   5:      unsigned int location;
   6:   
   7:      usingned int length;
   8:   
   9:  }NSRange;
  

涓夌鍒涘緩NSRange鐨勬柟娉曪細

   1:    1.NSRange range;
   2:   
   3:        range.location = 17;
   4:   
   5:        range.length = 4;
   6:   
   7:    2.NSRange range = {17,4};
   8:   
   9:    3.NSRange range = NSMakeRange(17,4);

2.NSPoint NSSize NSRect

   1:  typedef struct _NSPoint
   2:  {
   3:    float x;
   4:    float y;
   5:  }NSPoint;
   6:   
   7:  typedef struct _NSSize
   8:  {
   9:    float width;
  10:    float height;
  11:  }NSSize;
  12:   
  13:  typedef struct _NSRect
  14:  {
  15:    NSPoint origin;
  16:    NSSize size;
  17:  }NSRect;

鍒涘緩鏂規硶:NSMakePoint();NSMakeSize();NSMakeRect();

//浠ヤ笂鍑犱釜鏁版嵁綾誨瀷涓嶆槸瀵硅薄鑰屾槸struct錛屽師鍥犳槸鍥犱負婊¤凍鎬ц兘闇姹傘?

3.NSString NSMutableString

鍒涘緩鏂規硶:

   1:  + (id)stringWithFormat:(NSString *)format, ...
   2:   
   3:  NSString *height;
   4:  height = [NSString initWithFormat:@"Your height is %d feet",5];
   5:   

鍒涘緩鏂規硶:

   1:  NSMutableString *string;
   2:   
   3:  string = [NSMutableString stringWithCapacity:42];

4.NSArray NSMutableArray

鐢ㄦ潵瀛樺偍Objective-C鐨勫璞★紝鑰屼笉鑳藉瓨鍌–璇█涓殑鍩烘湰鏁版嵁綾誨瀷.

鍒涘緩鏂規硶:

   1:  + (id)arrayWithObjects:(id)firstObj, ...
   2:   
   3:  NSArray *array;
   4:  array = [NSArray arrayWithObjects:@"one",@"two",@"three",nil];
5.NSEnumerator(Tiger緋葷粺)
   1:  NSEnumerator *enumerator
   2:  enumerator = [array objectEnumerator];
   3:   
   4:  id thingie;
   5:  while(thingie = [enumerator nextObject])
   6:  {
   7:      NSLog(@"i found %@",thingie);
   8:  }
5.1蹇熸灇涓?/font>
   1:  for(NSString *string in array)
   2:  {
   3:      NSLog(@"i found %@",string);
   4:  }

6.NSDictionary

鍒涘緩鏂規硶錛?/p>

+(id)dictionaryWithObjectAndKeys:(id)fristObject,...;

娣誨姞鍏冪礌錛?/p>

-(void)setObject:(id)anObject forkey:(id)akey;

(fuck!!鍐欏埌榪欙紝windows live writer鎶ラ敊錛屽悗闈㈠啓鐨勯兘娌′繚瀛樷?

7.NSNumber

8.NSValue

9.NSNull



Wangkeke 2012-04-22 16:58 鍙戣〃璇勮
]]>
OS X Terminal瀛椾綋棰滆壊璁劇疆http://m.shnenglu.com/cokecoffe/archive/2012/04/13/171296.htmlWangkekeWangkekeFri, 13 Apr 2012 15:28:00 GMThttp://m.shnenglu.com/cokecoffe/archive/2012/04/13/171296.htmlhttp://m.shnenglu.com/cokecoffe/comments/171296.htmlhttp://m.shnenglu.com/cokecoffe/archive/2012/04/13/171296.html#Feedback0http://m.shnenglu.com/cokecoffe/comments/commentRss/171296.htmlhttp://m.shnenglu.com/cokecoffe/services/trackbacks/171296.html闃呰鍏ㄦ枃

Wangkeke 2012-04-13 23:28 鍙戣〃璇勮
]]>
NSArray Sorthttp://m.shnenglu.com/cokecoffe/archive/2012/04/05/170180.htmlWangkekeWangkekeThu, 05 Apr 2012 09:09:00 GMThttp://m.shnenglu.com/cokecoffe/archive/2012/04/05/170180.htmlhttp://m.shnenglu.com/cokecoffe/comments/170180.htmlhttp://m.shnenglu.com/cokecoffe/archive/2012/04/05/170180.html#Feedback0http://m.shnenglu.com/cokecoffe/comments/commentRss/170180.htmlhttp://m.shnenglu.com/cokecoffe/services/trackbacks/170180.htmlSorting

    - (NSArray *)sortedArrayUsingSelector:(SEL)comparator
Parameters
comparator

A selector that identifies the method to use to compare two elements at a time. The method should returnNSOrderedAscending if the receiving array is smaller than the argument,聽NSOrderedDescending if the receiving array is larger than the argument, and聽NSOrderedSame if they are equal.

//selector瀹氫箟浜嗕竴涓瘮杈冧袱涓暟緇勫厓绱犵殑鏂規硶錛屽鏋滄鏂規硶榪斿洖NSOrderedAscending璇存槑姝ゅ厓绱犳瘮鍙傛暟鍏冪礌灝忥紝濡傛灉榪斿洖NSOrderedDescending璇存槑鎺ユ敹鐨勬暟緇勫厓绱犳瘮鍙傛暟鍏冪礌澶э紝NSOrderedSame鐩哥瓑銆?/code>

    Example:
    涓涓厓绱犱負NSString鐨勬暟緇勫彲浠ラ氳繃璋冪敤NSString綾諱腑鐨?a style="color: #3366cc; text-decoration: none;" href="file:///Users/Escaton/Library/Developer/Shared/Documentation/DocSets/com.apple.adc.documentation.AppleiOS5_1.iOSLibrary.docset/Contents/Resources/Documents/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/Reference/NSString.html#//apple_ref/occ/instm/NSString/caseInsensitiveCompare:" target="_self">caseInsensitiveCompare:鏂規硶浣滀負Selector銆?/em>
    鍋囪anArray宸茬粡瀛樺湪錛?/em>
 NSArray *sortedArray =
         [anArray sortedArrayUsingSelector:@selector(caseInsensitiveCompare:)];


Wangkeke 2012-04-05 17:09 鍙戣〃璇勮
]]>
濡備綍鍦ㄥ鍙版満鍣ㄤ笂鍏變韓IOS璇佷功http://m.shnenglu.com/cokecoffe/archive/2012/03/13/167765.htmlWangkekeWangkekeTue, 13 Mar 2012 03:01:00 GMThttp://m.shnenglu.com/cokecoffe/archive/2012/03/13/167765.htmlhttp://m.shnenglu.com/cokecoffe/comments/167765.htmlhttp://m.shnenglu.com/cokecoffe/archive/2012/03/13/167765.html#Feedback0http://m.shnenglu.com/cokecoffe/comments/commentRss/167765.htmlhttp://m.shnenglu.com/cokecoffe/services/trackbacks/167765.html1. 涓嬭澆.cer鏂囦歡鍒板埆鐨勬満鍣ㄣ傚氨鏄湪IDP涓婄殑閭d釜銆?/span>
2. 浠庡彂閫佺敵璇鋒枃浠訛紙certificate Request錛屽悗緙鍚嶄負certSigningRequest錛夌殑鏈哄櫒涓婃妸璇佷功瀵瑰簲鐨刾rivate key錛?p12鏂囦歡錛夊鍑猴紝瀵嗙爜鑷繁瀹氾紝瑕佽浣忥紝鍚庨潰瀵煎叆鐨勬椂鍊欒鐢ㄣ?/span>
3. 鍦ㄤ綘闇瑕佺殑鏈哄櫒涓婂畨瑁呰瘉涔︼紙.cer錛夛紝瀵煎叆縐侀挜鏂囦歡(.p12)銆傚畨瑁呭搴擜pp鐨刾rovisioning profile銆?/span>
4. Over錛屼綘鍙互鐢ㄥ叾浠栨満鍣ㄥ紑鍙戜簡銆?/span>


娉細蹇呴』寰椾粠鐢寵鏈哄櫒涓婂鍑簆rivate key.鍒板叾浠栨満鍣ㄤ笂

涓銆佹垚鍛樹粙緇?/span>
1.聽聽聽聽Certification(璇佷功)
璇佷功鏄鐢佃剳寮鍙戣祫鏍肩殑璁よ瘉錛屾瘡涓紑鍙戣呭笎鍙鋒湁涓濂楋紝鍒嗕負涓ょ錛?/span>
1)聽聽聽聽Developer Certification(寮鍙戣瘉涔?
瀹夎鍦ㄧ數鑴戜笂鎻愪緵鏉冮檺錛氬紑鍙戜漢鍛橀氳繃璁懼榪涜鐪熸満嫻嬭瘯銆?/span>
鍙互鐢熸垚鍓湰渚涘鍙扮數鑴戝畨瑁咃紱
2)聽聽聽聽聽聽Distribution Certification(鍙戝竷璇佷功)
瀹夎鍦ㄧ數鑴戜笂鎻愪緵鍙戝竷iOS紼嬪簭鐨勬潈闄愶細寮鍙戜漢鍛樺彲浠ュ埗鍋氭祴璇曠増鍜屽彂甯冪増鐨勭▼搴忋?/span>
涓嶅彲鐢熸垚鍓湰錛屼粎鏈夐厤緗璇佷功鐨勭數鑴戞墠鍙嬌鐢紱錛堝壇鏈埗鍋氫粙緇嶅湪涓嬮潰Keychain涓粙緇嶏級

2.聽聽聽聽Provisioning Profile(鎺堟潈鏂囦歡)
鎺堟潈鏂囦歡鏄璁懼濡俰Pod Touch銆乮Pad銆乮Phone鐨勬巿鏉冿紝鏂囦歡鍐呰褰曠殑鏄澶囩殑UDID鍜岀▼搴忕殑App Id錛屽嵆浣胯鎺堟潈鐨勮澶囧彲浠ュ畨瑁呮垨璋冭瘯Bundle identifier涓庢巿鏉冩枃浠朵腑璁板綍鐨凙pp Id瀵瑰簲鐨勭▼搴忋?/span>
寮鍙戣呭笎鍙峰湪鍒涘緩鎺堟潈鏂囦歡鏃跺欎細閫夋嫨App Id錛岋紙寮鍙戣呭笎鍙蜂笅App Id涓坊鍔狅紝鍗曢夛級鍜孶DID錛堝紑鍙戣呭笎鍙蜂笅Devices涓坊鍔犳渶澶?00涓紝澶氶夛級銆?/span>
鎺堟潈鏂囦歡鍒嗕負涓ょ錛屽搴旂浉搴旂殑璇佷功浣跨敤錛?/span>
1)聽聽聽聽Developer Provisioning Profile(寮鍙戞巿鏉冩枃浠?
鍦ㄨ鏈夊紑鍙戣瘉涔︽垨鍓湰鐨勭數鑴戜笂浣跨敤錛屽紑鍙戜漢鍛橀夋嫨璇ユ巿鏉冩枃浠墮氳繃鐢佃剳灝嗙▼搴忓畨瑁呭埌鎺堟潈鏂囦歡璁板綍鐨勮澶囦腑錛屽嵆鍙繘琛岀湡鏈烘祴璇曘?/span>
娉ㄦ剰錛氱‘淇濈數鑴戞湁鏉冮檺鐪熸満璋冭瘯錛屽嵆瀹夎浜嗗紑鍙戣瘉涔︽垨鍓湰錛涘湪寮鍙戝伐鍏蜂腑紼嬪簭鐨凚undle identifier鍜岄変腑浣跨敤鐨勬巿鏉冩枃浠剁殑App Id瑕佷竴鑷達紱榪炴帴璋冭瘯鐨勮澶囩殑UDID鍦ㄩ変腑鐨勬巿鏉冩枃浠朵腑鏈夎褰曘?/span>
2)聽聽聽聽Distribution Provisioning Profile(鍙戝竷鎺堟潈鏂囦歡)
鍦ㄨ鏈夊彂甯冭瘉涔︾殑鐢佃剳涓婏紙鍗抽厤緗瘉涔︾殑鐢佃剳錛屽彧鏈変竴鍙幫級鍒跺仛嫻嬭瘯鐗堝拰鍙戝竷鐗堢殑紼嬪簭銆?/span>
鍙戝竷鐗堝氨鏄彂甯冨埌App Store涓婄殑紼嬪簭鏂囦歡錛屽紑鍙戣呭笎鍙峰垱寤烘巿鏉冩枃浠舵椂閫夋嫨store閫夐」錛岄夋嫨App Id錛屾棤闇閫夋嫨UDID錛?/span>
嫻嬭瘯鐗堝氨鏄湪鍙戝竷涔嬪墠浜ょ粰嫻嬭瘯浜哄憳鍙悓姝ュ埌璁懼涓婄殑紼嬪簭鏂囦歡錛屽紑鍙戣呭笎鍙峰垱寤烘巿鏉冩枃浠舵椂閫夋嫨AdHoc錛岄夋嫨App Id鍜孶DID錛涘彧鏈夐変腑鐨刄DID瀵瑰簲鐨勮澶囨墠鍙兘瀹夎涓婇氳繃璇ユ巿鏉冩枃浠跺埗鍋氱殑紼嬪簭銆?/span>
3.聽聽聽聽Keychain(寮鍙戝瘑閽?
瀹夎璇佷功鎴愬姛鐨勬儏鍐典笅璇佷功涓嬮兘浼氱敓鎴怟eychain錛屼笂闈㈡彁鍒扮殑璇佷功鍓湰灝辨槸閫氳繃閰嶇疆璇佷功鐨勭數鑴戝鍑篕eychain錛堝氨鏄?p12鏂囦歡錛夊畨瑁呭埌鍏朵粬鏈哄瓙涓婏紝璁╁叾浠栨満瀛愬緱鍒拌瘉涔﹀搴旂殑鏉冮檺銆侱eveloper Certification灝卞彲浠ュ埗鍋氬壇鏈琄eychain鍒嗗彂鍒板叾浠栫數鑴戜笂瀹夎錛屼嬌鍏跺彲浠ヨ繘琛岀湡鏈烘祴璇曘?/span>
娉ㄦ剰錛欴istribution Certification鍙湁閰嶇疆璇佷功鐨勭數鑴戞墠鍙嬌鐢紝鍥犳鍗充嬌瀵煎嚭瀵煎嚭Keychain瀹夎鍒板叾浠栫數鑴戜笂錛屽叾浠栫數鑴戜篃涓嶅彲鑳藉叿鏈夎瘉涔︾殑鏉冮檺銆?/span>



Wangkeke 2012-03-13 11:01 鍙戣〃璇勮
]]>
IOS涓紪鐮佽漿鎹㈡柟娉?杞級http://m.shnenglu.com/cokecoffe/archive/2012/02/06/165031.htmlWangkekeWangkekeMon, 06 Feb 2012 03:18:00 GMThttp://m.shnenglu.com/cokecoffe/archive/2012/02/06/165031.htmlhttp://m.shnenglu.com/cokecoffe/comments/165031.htmlhttp://m.shnenglu.com/cokecoffe/archive/2012/02/06/165031.html#Feedback0http://m.shnenglu.com/cokecoffe/comments/commentRss/165031.htmlhttp://m.shnenglu.com/cokecoffe/services/trackbacks/165031.html闃呰鍏ㄦ枃

Wangkeke 2012-02-06 11:18 鍙戣〃璇勮
]]>
Objective-C 灞炴у弬鏁?/title><link>http://m.shnenglu.com/cokecoffe/archive/2012/02/04/164960.html</link><dc:creator>Wangkeke</dc:creator><author>Wangkeke</author><pubDate>Sat, 04 Feb 2012 15:09:00 GMT</pubDate><guid>http://m.shnenglu.com/cokecoffe/archive/2012/02/04/164960.html</guid><wfw:comment>http://m.shnenglu.com/cokecoffe/comments/164960.html</wfw:comment><comments>http://m.shnenglu.com/cokecoffe/archive/2012/02/04/164960.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.shnenglu.com/cokecoffe/comments/commentRss/164960.html</wfw:commentRss><trackback:ping>http://m.shnenglu.com/cokecoffe/services/trackbacks/164960.html</trackback:ping><description><![CDATA[<h4>灞炴у弬鏁版湁浠ヤ笅涓夌Writability銆丼etter銆丼emantics Atomicity<br /><br />Writability<br /></h4><hr /><p style="margin-top: 0px; margin-bottom: 0.833em; font: normal normal normal 100%/normal 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; font-family: 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; font-size: 13px; ">These attributes specify whether or not a property has an associated set accessor. They are mutually exclusive.<br /></p><div><span style="color: #666666; font-family: Courier, Consolas, monospace; background-color: #ffffff; ">readwrite </span><span style="font-family: 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; font-size: 13px; line-height: normal; ">Indicates that the property should be treated as read/write. This attribute is the default.</span><div><div><span style="color: #666666; font-family: Courier, Consolas, monospace; font-size: 13px; line-height: normal; background-color: #ffffff; ">readonly </span><span style="font-family: 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; font-size: 10pt; "> If you use the </span><code style="font-family: Courier, Consolas, monospace; "><span style="font-size: 10pt; ">@synthesize</span></code><span style="font-family: 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; font-size: 10pt; "> directive in the implementation block, only the getter method is synthesized. Moreover, if you attempt to assign a value using the dot syntax, you get a compiler error.</span></div><div><h4>Setter Semantics<br /><hr /><br /><div><span style="font-weight: normal; background-color: #ffffff; ">These attributes specify the semantics of a set accessor. They are mutually exclusive.</span></div><div><span style="color: #666666; font-family: Courier, Consolas, monospace; font-weight: normal; background-color: #ffffff; ">strong<br />weak<br /></span><div><dt style="clear: both; margin-top: 0px; font-family: 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; font-size: 13px; line-height: normal; "><code style="font-family: Courier, Consolas, monospace; color: #666666; ">copy    </code><span style="font-weight: normal;">Specifies that a copy of the object should be used for assignment.The previous value is sent a <code style="font-family: Courier, Consolas, monospace; color: #666666; "><a target="_self" style="color: #003366; text-decoration: none; ">release</a></code> message.The copy is made by invoking the <code style="font-family: Courier, Consolas, monospace; color: #666666; "><a target="_self" style="color: #003366; text-decoration: none; ">copy<br /></a></code> </span>               <span style="font-weight: normal; ">method. This attribute is valid only for object types, which must implement the </span><code style="font-weight: normal; font-family: Courier, Consolas, monospace; color: #666666; ">NSCopying</code><span style="font-weight: normal; ">  </span><span data-header="Protocol" data-contents="A protocol declares a programmatic interface that any class may choose to implement. " style="font-weight: normal; color: #3366cc; text-decoration: none; border-bottom-width: 1px; border-bottom-style: dashed; border-bottom-color: #3366cc; white-space: nowrap; cursor: pointer; -webkit-transition-property: color, background-color, border-bottom, border-top-left-radius, border-top-right-radius, padding, margin; -webkit-transition-duration: 0.25s; "><a target="_self" data-href="../../../../General/Conceptual/DevPedia-CocoaCore/Protocol.html#//apple_ref/doc/uid/TP40008195-CH45" style="text-decoration: none; ">protocol</a></span><span style="font-weight: normal; ">.<br /></span><div>                 <span style="color: #333333; font-family: Arial; font-size: 14px; line-height: 26px; text-align: left; background-color: #ffffff; ">鎸囧畾搴旇浣跨敤瀵硅薄鐨勫壇鏈紙娣卞害澶嶅埗錛夛紝鍓嶄竴涓煎彂閫佷竴鏉elease娑堟伅銆傚熀鏈笂鍍弐etain錛屼絾鏄病鏈夊鍔犲紩鐢ㄨ鏁幫紝鏄垎閰嶄竴鍧楁柊鐨勫唴<br />                 瀛樻潵鏀劇疆瀹冦?br /><br /></span></div></dt></div><span style="color: #666666; font-family: Courier, Consolas, monospace; font-weight: normal; background-color: #ffffff; ">assgin </span><span style="font-family: 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; line-height: normal; font-size: 10pt; font-weight: normal;">Specifies that the setter uses simple assignment. This attribute is the default.</span><span style="font-weight: normal;"><span style="font-family: 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; line-height: normal; font-size: 10pt; "> </span><span style="font-family: 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; font-size: 10pt; line-height: normal; ">You use this attribute for scalar types such as </span><code style="font-size: 13px; line-height: normal; font-family: Courier, Consolas, monospace; color: #666666; "><span style="font-size: 10pt; ">NSInteger</span></code><span style="font-family: 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; font-size: 10pt; line-height: normal; "> and </span><code style="font-size: 13px; line-height: normal; font-family: Courier, Consolas, monospace; color: #666666; "><span style="font-size: 10pt; ">CGRect</span></code><span style="font-family: 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; font-size: 10pt; line-height: normal; ">.<br /></span></span><div>            <span style="color: #444444; font-family: 瀹嬩綋, verdana, helvetica, sans-serif; background-color: #ffffff; ">setter鏂規硶鐩存帴璧嬪鹼紝鑰屼笉榪涜retain鎿嶄綔錛屾瘮濡侼SInteger鍜孋GRect錛屽畠浠笉鏄璞★紝鎵浠ヤ笉鐢╮elease銆?br /><br /></span></div><span style="color: #666666; font-family: Courier, Consolas, monospace; font-weight: normal; background-color: #ffffff; ">retain </span><span style="font-weight: normal;"><span style="font-family: 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; font-size: 13px; line-height: normal; ">Specifies that </span><code style="font-size: 13px; line-height: normal; font-family: Courier, Consolas, monospace; color: #666666; "><a target="_self" style="color: #003366; text-decoration: none; ">retain</a></code><span style="font-family: 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; font-size: 13px; line-height: normal; "> should be invoked on the object upon assignment.</span><span style="font-family: 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; font-size: 13px; line-height: normal; ">The previous value is sent a </span><code style="font-size: 13px; line-height: normal; font-family: Courier, Consolas, monospace; color: #666666; "><a target="_self" style="color: #003366; text-decoration: none; ">release</a></code><span style="font-family: 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; font-size: 13px; line-height: normal; "> message.<br /></span></span><div>            <span style="color: #444444; font-family: 瀹嬩綋, verdana, helvetica, sans-serif; background-color: #ffffff; ">setter鏂規硶瀵瑰弬鏁拌繘琛宺elease鏃у鹼紝鍐峳etain鏂板?渚嬪錛?/span>    </div><div style="font-size: 13px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: #cccccc; border-right-color: #cccccc; border-bottom-color: #cccccc; border-left-color: #cccccc; border-image: initial; padding-right: 5px; padding-bottom: 4px; padding-left: 4px; padding-top: 4px; width: 98%; word-break: break-all; background-color: #eeeeee; ">銆     1.-(<span style="color: #0000ff; ">void</span>) setObj:(ClassX*) value<br />         2.{<br />銆      3.         <span style="color: #0000FF; ">if</span> (obj != value)<br />銆      4.         {<br />銆      5.                   [obj release];<br />銆      6.                   obj = [value retain];<br />銆      7.         }<br />銆      8.}</div><span style="color: #666666; font-family: Courier, Consolas, monospace; font-weight: normal; background-color: #ffffff; "><br /></span><div><h4>Atomicity<br /><hr /><br /><div><span style="font-weight: normal; background-color: #ffffff; ">You can use this attribute to specify that accessor methods are not atomic. (There is no keyword to denote atomic.)</span></div><div><span style="color: #666666; font-family: Courier, Consolas, monospace; font-weight: normal; background-color: #ffffff; ">nonatomic</span><span style="font-weight: normal;"><span style="color: #666666; font-family: Courier, Consolas, monospace; background-color: #ffffff; "> </span><span style="font-family: 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; font-size: 13px; line-height: normal; ">Specifies that accessors are nonatomic. </span><em style="font-family: 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; font-size: 13px; line-height: normal; ">By default, accessors are atomic.</em></span></div></h4></div></div></h4></div></div></div><p> </p><img src ="http://m.shnenglu.com/cokecoffe/aggbug/164960.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.shnenglu.com/cokecoffe/" target="_blank">Wangkeke</a> 2012-02-04 23:09 <a href="http://m.shnenglu.com/cokecoffe/archive/2012/02/04/164960.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>NSDictionaryhttp://m.shnenglu.com/cokecoffe/archive/2012/02/04/164957.htmlWangkekeWangkekeSat, 04 Feb 2012 14:16:00 GMThttp://m.shnenglu.com/cokecoffe/archive/2012/02/04/164957.htmlhttp://m.shnenglu.com/cokecoffe/comments/164957.htmlhttp://m.shnenglu.com/cokecoffe/archive/2012/02/04/164957.html#Feedback0http://m.shnenglu.com/cokecoffe/comments/commentRss/164957.htmlhttp://m.shnenglu.com/cokecoffe/services/trackbacks/164957.html闃呰鍏ㄦ枃

Wangkeke 2012-02-04 22:16 鍙戣〃璇勮
]]>
NSRange鐢ㄦ硶錛堣漿錛?/title><link>http://m.shnenglu.com/cokecoffe/archive/2012/01/31/164722.html</link><dc:creator>Wangkeke</dc:creator><author>Wangkeke</author><pubDate>Tue, 31 Jan 2012 07:15:00 GMT</pubDate><guid>http://m.shnenglu.com/cokecoffe/archive/2012/01/31/164722.html</guid><wfw:comment>http://m.shnenglu.com/cokecoffe/comments/164722.html</wfw:comment><comments>http://m.shnenglu.com/cokecoffe/archive/2012/01/31/164722.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.shnenglu.com/cokecoffe/comments/commentRss/164722.html</wfw:commentRss><trackback:ping>http://m.shnenglu.com/cokecoffe/services/trackbacks/164722.html</trackback:ping><description><![CDATA[     鎽樿: NSRange鐨勫畾涔?typedef struct _NSRange {   NSUInteger location;   NSUInteger length; } NSRange;   NSRange鏄竴涓粨鏋勪綋錛屽叾涓璴ocation鏄竴涓互0涓哄紑濮嬬殑index錛宭ength鏄〃紺哄...  <a href='http://m.shnenglu.com/cokecoffe/archive/2012/01/31/164722.html'>闃呰鍏ㄦ枃</a><img src ="http://m.shnenglu.com/cokecoffe/aggbug/164722.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.shnenglu.com/cokecoffe/" target="_blank">Wangkeke</a> 2012-01-31 15:15 <a href="http://m.shnenglu.com/cokecoffe/archive/2012/01/31/164722.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>nonatomichttp://m.shnenglu.com/cokecoffe/archive/2011/11/30/161243.htmlWangkekeWangkekeWed, 30 Nov 2011 11:51:00 GMThttp://m.shnenglu.com/cokecoffe/archive/2011/11/30/161243.htmlhttp://m.shnenglu.com/cokecoffe/comments/161243.htmlhttp://m.shnenglu.com/cokecoffe/archive/2011/11/30/161243.html#Feedback0http://m.shnenglu.com/cokecoffe/comments/commentRss/161243.htmlhttp://m.shnenglu.com/cokecoffe/services/trackbacks/161243.html瀹冭涓嶡synthesize涓璧蜂嬌鐢ㄦ墠鏈夋剰涔?
atomic鐨勬剰鎬濆氨鏄痵etter/getter榪欎釜鍑芥暟鏄竴涓師璇搷浣溿傚鏋滄湁澶氫釜綰跨▼鍚屾椂璋冪敤setter鐨勮瘽錛屼笉浼氬嚭鐜版煇涓涓嚎紼嬫墽琛宻etter鍏ㄩ儴璇彞涔嬪墠錛屽彟涓涓嚎紼嬪紑濮嬫墽琛宻etter鎯呭喌錛岀浉褰撲簬鍑芥暟澶村熬鍔犱簡閿佷竴鏍?
nonatomic涓嶄繚璇乻etter/getter鐨勫師璇錛屾墍浠ヤ綘鍙兘浼氬彇鍒頒笉瀹屾暣鐨勪笢瑗褲?姣斿setter鍑芥暟閲岄潰鏀瑰彉涓や釜鎴愬憳鍙橀噺錛屽鏋滀綘鐢╪onatomic鐨勮瘽錛実etter鍙兘浼氬彇鍒板彧鏇存敼浜嗗叾涓竴涓彉閲忔椂鍊欑殑鐘舵?.

Wangkeke 2011-11-30 19:51 鍙戣〃璇勮
]]>
Target failed to run: Remote exception encountered: 'Failed to get task for pid #http://m.shnenglu.com/cokecoffe/archive/2011/11/16/160279.htmlWangkekeWangkekeWed, 16 Nov 2011 09:23:00 GMThttp://m.shnenglu.com/cokecoffe/archive/2011/11/16/160279.htmlhttp://m.shnenglu.com/cokecoffe/comments/160279.htmlhttp://m.shnenglu.com/cokecoffe/archive/2011/11/16/160279.html#Feedback0http://m.shnenglu.com/cokecoffe/comments/commentRss/160279.htmlhttp://m.shnenglu.com/cokecoffe/services/trackbacks/160279.htmlThen when i rerun my app with instrument i received another error which was the topic of this post. After searching a little bit. It's actually very easy to fix.

1.Make sure, the "Profile" scheme is using "debug" not "release" build configuration

Here is the way how to change it: In Xcode4, select "Product/Edit Scheme" from the top menu then click on the "Profile" button on the left panel. Under the "Info" tab you will see "Build configuration", make sure "Debug" is selected.

Wangkeke 2011-11-16 17:23 鍙戣〃璇勮
]]>
OpenGL ES multithreading and EAGLSharegrouphttp://m.shnenglu.com/cokecoffe/archive/2011/11/15/160185.htmlWangkekeWangkekeTue, 15 Nov 2011 09:36:00 GMThttp://m.shnenglu.com/cokecoffe/archive/2011/11/15/160185.htmlhttp://m.shnenglu.com/cokecoffe/comments/160185.htmlhttp://m.shnenglu.com/cokecoffe/archive/2011/11/15/160185.html#Feedback0http://m.shnenglu.com/cokecoffe/comments/commentRss/160185.htmlhttp://m.shnenglu.com/cokecoffe/services/trackbacks/160185.htmlhttp://developer.apple.com/library/ios/#qa/qa1612/_index.html
Technical Q&A QA1612

OpenGL ES multithreading and EAGLSharegroup

Q:  In my multithreading OpenGL ES application, I load textures (or vertices) on a secondary thread then draw them onto screen on the main thread. Occasionally I see blank images or application freezes. What could be causing this?

A: In my multithreading OpenGL ES application, I load textures (or vertices) on a secondary thread then draw them onto screen on the main thread. Occasionally I see blank images or application freezes. What could be causing this?

It is very likely that the main and background threads are accessing the same OpenGL ES context simultaneously.

OpenGL ES commands for a specific context are not reentrant. You should never have more than one thread accessing a single context at the same time. It is highly recommended that you use only one thread per context.

Listing 1 demonstrates how to create and make current a context contextB using the sharegroup property (an EAGLSharegroup object) obtained from another already-allocated context contextA. Such contexts that belong to the same sharegroup can share resources, for example, textures, FBOs, etc. So you may use contextB on the secondary thread to create textures, and contextA on the main thread to draw the textures onto screen.


Listing 1  Creating a context belonging to the same sharegroup

contextB = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES1      
                             sharegroup:contextA.sharegroup]; 
if (!contextB || ![EAGLContext setCurrentContext:contextB]) 
{       
 // Handle errors here 
}

 

When you want to modify a resource on one context, you must first make sure it is not currently in use on another, even if you are accessing them from different threads. Once you modify it, its state is undefined until flushing and binding the object have been completed. You should never use an undefined object, whether you access it from a different context or not.

Take a texture as an example. Listing 2 shows the correct way to deal with multiple contexts. Any other ordering will not ensure consistent and correct behavior. It may result in data corruption, leaks, or crashes otherwise.

Listing 2  Modifying a texture on context B prior to using it on context A


// 1. Ensure context A is not bound to the texture
 [EAGLContext setCurrentContext:contextA];
 glBindTexture(GL_TEXTURE_2D, 0);  

// 2. Call flush on context A  
glFlush();   

// 3. Modify the texture on context B 
[EAGLContext setCurrentContext:contextB]; 
glBindTexture(GL_TEXTURE_2D, texId); 

 //
 Modify the texture data here
 //

// 4. Call flush on context B 
glFlush();  
 
// 5. Rebind the texture on context A 
[EAGLContext setCurrentContext:contextA];
 glBindTexture(GL_TEXTURE_2D, texId); 

// 6. Use the texture as normal on context A

 

For more information on the EAGLContext/-initWithAPI:sharegroup: API and the sharegroup property, see the EAGLContext Class Reference.



Wangkeke 2011-11-15 17:36 鍙戣〃璇勮
]]>
Iphone SDK 鑾峰緱褰撳墠榪炴帴鐨凷SID絳変俊鎭?/title><link>http://m.shnenglu.com/cokecoffe/archive/2011/10/11/158088.html</link><dc:creator>Wangkeke</dc:creator><author>Wangkeke</author><pubDate>Tue, 11 Oct 2011 15:03:00 GMT</pubDate><guid>http://m.shnenglu.com/cokecoffe/archive/2011/10/11/158088.html</guid><wfw:comment>http://m.shnenglu.com/cokecoffe/comments/158088.html</wfw:comment><comments>http://m.shnenglu.com/cokecoffe/archive/2011/10/11/158088.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.shnenglu.com/cokecoffe/comments/commentRss/158088.html</wfw:commentRss><trackback:ping>http://m.shnenglu.com/cokecoffe/services/trackbacks/158088.html</trackback:ping><description><![CDATA[    浠婂ぉ嫻嬭瘯鎻愬嚭鏂伴渶姹傦紝瑕佹眰Kpad杞歡鍚姩鍚庯紝榛樿緇戝畾鎴塊棿鍙鋒槸璺敱鍚嶇О錛圫SID錛夌殑鎴垮彴銆?br />     鏂規硶濡備笅錛?.鑾峰彇鍒板綋鍓嶈繛鎺ョ殑SSID銆?br />                   2.浠庢湇鍔″櫒璇誨彇鎵鏈夋埧鍙扮殑淇℃伅錛屽皢鎴垮彴鍙蜂笌鑾峰彇鐨凷SID榪涜姣旇緝錛岀劧鍚庣粦瀹氭鎴垮彴銆?br /> <br />鍏充簬鑾峰彇璺敱SSID鐨勬柟娉曪細<br /><div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><span style="color: #000000; ">-</span><span style="color: #000000; "> (id)fetchSSIDInfo<br />{<br />    CFArrayRef  ifs </span><span style="color: #000000; ">=</span><span style="color: #000000; "> CNCopySupportedInterfaces();<br /><br />    CFDictionaryRef info </span><span style="color: #000000; ">=</span><span style="color: #000000; "> CNCopyCurrentNetworkInfo(CFArrayGetValueAtIndex(ifs, </span><span style="color: #000000; ">0</span><span style="color: #000000; ">));<br />          <br />    NSLog(</span><span style="color: #000000; ">@"</span><span style="color: #000000; ">SSID: %@</span><span style="color: #000000; ">"</span><span style="color: #000000; ">,(NSString </span><span style="color: #000000; ">*</span><span style="color: #000000; ">)CFDictionaryGetValue (info,kCNNetworkInfoKeySSID ));<br />    <br />    [ifs release];<br />    [info release];<br /><br />}<br /></span></div><img src ="http://m.shnenglu.com/cokecoffe/aggbug/158088.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.shnenglu.com/cokecoffe/" target="_blank">Wangkeke</a> 2011-10-11 23:03 <a href="http://m.shnenglu.com/cokecoffe/archive/2011/10/11/158088.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <p>感谢您访问我们的网站,您可能还对以下资源感兴趣:</p> <a href="http://m.shnenglu.com/" title="精品视频久久久久">精品视频久久久久</a> <div class="friend-links"> </div> </div> </footer> <a href="http://www.joyitsai.cn" target="_blank">中文字幕久久亚洲一区</a>| <a href="http://www.vyty.cn" target="_blank">狠狠综合久久综合88亚洲</a>| <a href="http://www.rh-hr.cn" target="_blank">亚洲国产欧洲综合997久久</a>| <a href="http://www.fayongshicai.cn" target="_blank">久久久久国色AV免费看图片</a>| <a href="http://www.tangwoshi.cn" target="_blank">国产亚洲综合久久系列</a>| <a href="http://www.yanggroup.cn" target="_blank">中文字幕久久精品无码</a>| <a href="http://www.vtql.cn" target="_blank">久久精品中文字幕一区</a>| <a href="http://www.ujjr.cn" target="_blank">久久无码高潮喷水</a>| <a href="http://www.thha.cn" target="_blank">国产成人精品综合久久久久 </a>| <a href="http://www.sunyu-display.cn" target="_blank">久久天堂AV综合合色蜜桃网</a>| <a href="http://www.x705.cn" target="_blank">国产精品久久久久免费a∨</a>| <a href="http://www.zixunlawyer.com.cn" target="_blank">色8激情欧美成人久久综合电</a>| <a href="http://www.shangbi.com.cn" target="_blank">久久久WWW成人免费毛片</a>| <a href="http://www.zgyjys.cn" target="_blank">久久精品国产只有精品66</a>| <a href="http://www.bvvnm.com.cn" target="_blank">久久久久无码精品</a>| <a href="http://www.janba.cn" target="_blank">无码精品久久一区二区三区</a>| <a href="http://www.3233567.cn" target="_blank">欧美日韩精品久久久免费观看</a>| <a href="http://www.cqxy168.cn" target="_blank">国产精品久久新婚兰兰</a>| <a href="http://www.whnnmj.cn" target="_blank">亚洲va久久久噜噜噜久久天堂 </a>| <a href="http://www.mydata.org.cn" target="_blank">亚洲精品美女久久久久99</a>| <a href="http://www.pouhai.cn" target="_blank">久久久一本精品99久久精品88</a>| <a href="http://www.micgroup.cn" target="_blank">久久久久亚洲AV片无码下载蜜桃</a>| <a href="http://www.cqbus.com.cn" target="_blank">狠狠色丁香久久婷婷综合_中</a>| <a href="http://www.fygjkd.cn" target="_blank">亚洲精品乱码久久久久久久久久久久 </a>| <a href="http://www.gvsx.cn" target="_blank">99999久久久久久亚洲</a>| <a href="http://www.jiulongpu.cn" target="_blank">97久久精品午夜一区二区</a>| <a href="http://www.zhangqiu114.cn" target="_blank">97精品国产91久久久久久</a>| <a href="http://www.electricbed.cn" target="_blank">99久久精品国产毛片</a>| <a href="http://www.epuda.cn" target="_blank">人人狠狠综合久久亚洲</a>| <a href="http://www.ssc950.cn" target="_blank">精品久久亚洲中文无码</a>| <a href="http://www.rosettagetty.com.cn" target="_blank">久久亚洲日韩精品一区二区三区</a>| <a href="http://www.aygdxx.cn" target="_blank">国产精品久久久久久搜索</a>| <a href="http://www.znhongsheng.com.cn" target="_blank">99久久精品九九亚洲精品</a>| <a href="http://www.q812.cn" target="_blank">亚洲精品乱码久久久久久蜜桃 </a>| <a href="http://www.yangrendong.com.cn" target="_blank">99精品国产综合久久久久五月天</a>| <a href="http://www.xoci.cn" target="_blank">久久午夜伦鲁片免费无码</a>| <a href="http://www.h8443.cn" target="_blank">大蕉久久伊人中文字幕</a>| <a href="http://www.ramada-zhengzhou.cn" target="_blank">欧美久久一区二区三区</a>| <a href="http://www.yunva.cn" target="_blank">久久99国产精品尤物</a>| <a href="http://www.qqtushu.cn" target="_blank">久久午夜福利电影</a>| <a href="http://www.accuratelocator.cn" target="_blank">久久久老熟女一区二区三区</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>