iOS development: Open source frameworks and classes

Source: Internet
Author: User
Tags button type http request json

Open source frameworks and classes to use:

1:sdwebimage,uiimageview+webcache load a picture.

2:uiviewext is useful for locating coordinates and can be obtained directly from Bottom,top,left,right.

3:customcatagory, is a class, which has Navigationbar and Uinavigationcontroller of the two system versions of the custom Navigationbar background image method, Used to customize the navigationbar background picture.

4:uiutils Tool class, Inside I wrote four methods, one to get document path under documents, one to convert nsdate type to string type, one to convert string to NSDate type, and a scoring string to be passed into two, placed in the array, Use to display a rating of two different font types.

The 5:consts constant class, which holds the constants that are used throughout the project, written in macro form.

The button type is customized in the 6:uifactory, and two common button styles are used.

7:jsonkit class for JSON data parsing

8:asihttprequest Open Source Library, for request network, need to rely on these five systems from the library cfnetwork, SystemConfiguration, Mobilecoreservices, and Libz, LIBXML2.

9:datasevrice network request class, split get and POST request two ways, use HTTP request network, use Asiformdatarequest class, need a URL parameter, when use GET request, do not need dictionary parameter, add a request header, When a POST request is used, a dictionary parameter is required to send the value through the key keys. The Asiformdatarequest object uses block request data, judges the version, uses the Jsonkit class under the iOS5 JSON parsing class nsjsonserialization,5.0 version, after the request, uses the blocks callback. If the request fails, the return request fails.

10: Into the Model object class, the requested network data dictionary into the model object. Facilitates data transfer between other classes.

11: A single case class has been customized to store data that needs to be transferred between controllers in the project for easy invocation.

12: Use OpenFlow Open source framework, used to display the first page of the picture to achieve the effect, in the Afitemview class inside the HD and low-clear two styles, to achieve the inside three agent method, a change in the picture switch, a request to load the picture, through _ Operationqueue creates a thread to load, because if all the pictures are loaded on the main thread, it can cause a blockage of threads.

13:egorefreshtableheaderview is used to pull down and refresh, implement several proxy methods inside, when the finger is released, the load data proxy method is invoked.

Small tips:

The class. h file imported in mtime-prefix.pch can be used throughout the project.

You can change the Statebar style in the Mtime-info.plist file, there are three kinds.

In the localizations can be changed localization, you can set up a variety of languages, in the hardware also to do the appropriate settings.

Hold Option+command+run to add a variable to locate the error.

In the project, it is best to open the static Analyzer, you will be prompted there is a memory leak, of course, not accurate, be sure to remember to manage memory.

A bug or a direct crash, if the report is exc-bad-access then means that the object has been released before, but it is also used in the back, so go backwards to look up. Several commonly used methods of tuning bugs, interrupt point step by step search, print, including data, reference count, temporarily block part of the code, part of the search.

Related Article

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.