IOS Third-party Libraries (1)

Source: Internet
Author: User
Tags sqlite database
<span id="Label3"></p>Mknetwork<p><p>Access to open source libraries by a widely used third-party Network. Used to provide a more user-friendly network access Interface. I believe many of my friends who have developed iOS have used it.</p></p>Regexkit<p><p>Regexkit is a regular expression tool class. Provides powerful regular expression matching and substitution capabilities. We use it primarily to replace the text of a similar microblogging process. For example, to replace @ So with a link, the URL of the image to the IMG tag.</p></p><p><p>At the same time, Open Source Library Mgtemplateengine also relies on this library. Attach RegexKit4.0 's official documentation Tutorials.</p></p>Mgtemplateengine<p><p>Mgtemplateengine is a template engine. We use it primarily to generate the content of a single microblogging page. Our single microblogging page is intended to be displayed in uiwebview, so the content needs to be rendered in HTML format. Mgtemplateengine's Template language is more like: Smarty, freemarker, and Django's template Language.</p></p><p><p>Mgtemplateengine's Author Official blog is Here.</p></p><p><p>When we used it, we modified the filter class of this open source library by adding 3 custom filters to provide our format time, the way to escape HTML and to filter the users of the short Image.</p></p>Jsonkit<p><p>Jsonkit is a more efficient JSON parsing library. I have compared the performance of the various JSON parsing libraries (article here), Jsonkit is very good, The approximate use example is as Follows:</p></p> <table> <tbody> <tr> <td class="gutter"><pre class="line-numbers"><span class="line-number">1<span class="line-number">2<span class="line-number">3<span class="line-number">4<span class="line-number">5<span class="line-number">6</span> </span> </span> </span> </span></span></pre></td> <td class="code"><pre><code class="objc"><span class="line"><span class="cp">#import "JSONKit.h"<span class="line"><span class="line"><span class="n">NSString<span class="o">*<span class="n">Path<span class="o">=<span class="p">[[<span class="n">NSBundle<span class="n">Mainbundle<span class="p"><span class="p">] <span class="nl">pathforresource:<span class="s">@ "data" <span class="nl">oftype: <span class="s">@ "json" <span class="p">); <span class="line"><span class="n">nsdata <span class="o">*<span class="n">content <span class="o">= <span class="p">[<span class="n">nsdata <span class="nl">datawithcontentsoffile:<span class="n">path <span class="p">; <span class="line"><span class="n">nsdictionary <span class="o">*<span class="n">kitdata <span class="o">= <span class="p">[<span class="n">content <span class="n">objectfromjsondata<span class="p">];<span class="line"> <span class="n">nsstring <span class="o">*<span class="n">kitstring <span class="o">= <span class="p">[ <span class="n">kitdata <span class="n">jsonstring<span class="p">]; </span> </span> </span> </span> </span> </span> </span> </span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span> </span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></code></pre></td> </tr> </tbody> </table>Gtmnsstring<p><p>Gtmnsstring is primarily used to escape special characters in Html. To prevent XSS attacks.</p></p>FMDB<p><p>Fmdb is a SQLite database encapsulation class that needs to join Libsqlite3.dylib dependencies and introduce sqlite3.h header Files. It's very easy to Use. Here is an example:</p></p> <table> <tbody> <tr> <td class="gutter"><pre class="line-numbers"><span class="line-number">1<span class="line-number">2<span class="line-number">3<span class="line-number">4<span class="line-number">5<span class="line-number">6<span class="line-number">7<span class="line-number">8<span class="line-number">9<span class="line-number"><span class="line-number"></span> </span> </span> </span> </span> </span> </span> </span> </span> </span></span></pre></td> <td class="code"><pre><code class="objc"><span class="line"><span class="n">NSString<span class="o">*<span class="n">Docsdir<span class="o">=<span class="p">[<span class="n">Nssearchpathfordirectoriesindomains<span class="p">(<span class="n">NSDocumentDirectory<span class="p">,<span class="n">Nsuserdomainmask<span class="p">,<span class="n">YES<span class="p">)<span class="n">Lastobject<span class="p">];<span class="line"><span class="n">NSString<span class="o">*<span class="n">DBPath<span class="o">=<span class="p">[<span class="n">Docsdir<span class="nl">Stringbyappendingpathcomponent:<span class="s">@ "user.sqlite"<span class="p">];<span class="line"><span class="n">Fmdatabase<span class="o">*<span class="n">Db<span class="o">=<span class="p">[<span class="n">Fmdatabase<span class="nl">Databasewithpath:<span class="n">DBPath<span class="p">];<span class="line"><span class="p">[<span class="n">Db<span class="n">Open<span class="p">];<span class="line"><span class="n">Fmresultset<span class="o">*<span class="n">Rs<span class="o">=<span class="p">[<span class="n"><span class="n">db <span class="nl">executequery:<span class="s">@ "select * from people" <span class="p">];<span class="line"><span class="k">while <span class="p"> ([<span class="n">rs <span class="n">next<span class="p">]) Span class= "p" >{<span class="line"> <span class="n">nslog<span class="p"> (<span class="s">@ "%@%@" <span class="p">,<span class="line"> <span class="p">[<span class="n">rs <span class="nl">stringforcolumn:<span class="s">@ "firstname" <span class="p">],<span class="line"> <span class="p">[<span class="n">rs <span class="nl">stringforcolumn:<span class="s">@ "lastname" <span class="p">); <span class="line"><span class="p">}<span class="line"><span class="p">[<span class="n">db <span class="n"> Close<span class="p">; </span> </span> </span> </span> </span> </span> </span> </span> </span> </span> </span> </span> </span> </span> </span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span> </span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></code></pre></td> </tr> </tbody> </table>Bbcustombackbuttonviewcontroller<p><p>Bbcustombackbuttonviewcontroller is an Open-source library for providing custom Navigationbar buttons on ios4. Using the exception is simple, just let your own viewcontroller inherit it.</p></p><p><p>I made a change to the bbcustombackbuttonviewcontroller, mainly by changing the style of its custom buttons to match our Style.</p></p>Mtstatusbaroverlay<p><p>Mtstatusbaroverlay is an open source library that displays messages at the top of the iphone status bar. The sample code is as Follows:</p></p> <table> <tbody> <tr> <td class="gutter"><pre class="line-numbers"><span class="line-number">1<span class="line-number">2<span class="line-number">3<span class="line-number">4<span class="line-number">5<span class="line-number">6<span class="line-number">7<span class="line-number">8</span> </span> </span> </span> </span> </span> </span></span></pre></td> <td class="code"><pre><code class="objc"><span class="line"><span class="k">+<span class="p">(<span class="kt">void<span class="p">)<span class="nf">Showcompletedtextonstatusbar:<span class="p">(<span class="n">NSString<span class="o">*<span class="p">)<span class="nv">Text<span class="p">{<span class="line"> <span class="n">NSString<span class="o">*<span class="n">Message<span class="o">=<span class="p">[<span class="n">NSString<span class="nl">Stringwithformat:<span class="s">@ "%@ success"<span class="p">,<span class="n">Text<span class="p">];<span class="line"> <span class="n">Mtstatusbaroverlay<span class="o">*<span class="n">Overlay<span class="o">=<span class="p">[<span class="n">Mtstatusbaroverlay<span class="n">Sharedinstance<span class="p">];<span class="line"><span class="line"> <span class="n">overlay<span class="p">.<span class="n"> Animation <span class="o">= <span class="n">mtstatusbaroverlayanimationfalldown<span class="p">;<span class="line"> <span class="n">overlay<span class="p">.<span class="n"> Detailviewmode <span class="o">= <span class="n">mtdetailviewmodehistory<span class="p">;<span class="line"> Span class= "p" >[<span class="n">overlay <span class="nl">postimmediatefinishmessage:<span class="n">message <span class="nl">duration:<span class="mf">2.0 <span class="nl">animated:<span class="n">yes<span class="p">];<span class="line"> <span class="n">overlay<span class="p">.<span class="n"> Progress <span class="o">= <span class="mf">1.0<span class="p">;<span class="line"> <span class="p"> </span> </span> </span> </span> </span> </span> </span> </span> </span> </span> </span> </span> </span> </span> /span> </span> </span> </span> </span> </span> </span> </span> </span> </span> </span> </span> </span> </span> </span> </span> </span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></code></pre></td> </tr> </tbody> </table><p><p>But StackOverflow said there was a project because the audit was rejected, but Sina Weibo obviously adopted this UI scheme, so we still use this library boldly. later, We also successfully passed the Audit.</p></p>Mbprogresshud<p><p>Mbprogresshud is a class that displays gray loading progress or results. Compared with the system comes from the uialertview, Mbprogresshud because the figure is black, so the visual is not so strong. We mainly use it to show some hints in loading, as well as some of the results of the operation that have disappeared (such as a network failure, etc.).</p></p>Nsstringwrapper<p><p>Because I have many years of Java development experience, I am still not accustomed to objective-c even basic string operations to check the document, and I do not remember the old method name, so I put objective-c string basic operations are encapsulated into a Java-style method Call. This is part of the early time to spend the weekend at home, so is open source, source code address.</p></p>Egotableviewpullrefresh<p><p>Egotableviewpullrefresh an open source Drop-down refresh Component. I have improved it and added a forced refresh Feature.</p></p>Loadmoretablefooterview<p><p>Loadmoretablefooterview an open-source pull-up to load more Components. I made a few changes to allow it to support the resolution of the iPhone5.</p></p>Zepto.js<p><p>Zepto is a jquery-like open source library that implements CSS selectors and some Dom Operations. Its API is almost exactly the same as jquery, with the advantage of being small in size.</p></p>Ejs<p><p>Ejs a js-side template library. We are primarily used to render content that is loaded asynchronously in some UIWEBVIEW. For example, comments on notes, answers to Questions.</p></p><p><p>IOS Third-party Libraries (1)</p></p></span>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.