[Reprinted] iPhone [three20] three20 series three20 Overview

Source: Internet
Author: User
Tags md5 hash

From: http://apps.hi.baidu.com/share/detail/31820391

 

[Three20] three20-three20 Overview [three20] three20-three20 Overview

This article is translated by Ling Han from three20Technical materialsPerform minor repairs.
Reprinted please indicate the source: www.yuephone.com

Three20 is conceptually divided into four parts: the center of everything isCore), Around it. YesNetwork),User Interface (UI)AndStyle).

 

Core)
Considering that the kernel is like a Swiss Army knife developed by objective-C, we should spend some time familiarizing ourselves with its features.
With the three20 kernel (CORE), you can:

  • Generate an MD5 hash from an nsdata object;
  • Extends the logging and debugging capabilities of xcode;
  • Compare the version size of a string (for example, version 3.0 is earlier than version 3.1 );
  • Used by the delegate (delegate) to create arrays (nsarrays) and dictionaries (nsdictionaries) that do not reference the count (non-retaining;
  • Clear the HTML tag in the string;
  • Safely add non-empty characters (non-empty, non-nil) to the dictionary (nsdictionaries );
  • Format relative time (for example, 5 hours ago ).

All of the above methods can be found in the xcode project of three20 as follows:
Global => CoreAndGlobal => additions => Core Groups.

Network)
If we are building a web API-based application, three20's network component will make our work easier. Three20 supports Network caching on disks and memory. In addition, there is a processing layer built on the network request, making it easier to process the data returned by the network.

User Interface (UI)
The three20 User Interface (UI) contains a comprehensive set of general views and controllers. The famous Facebook Photo browsing and thumbnail viewer are one of them.
 

To imitate the email editor in the iPhone mail application, you can use the ttmessagecontroller component. To use a message sending window like Facebook, you can use the ttpostcontroller component.
 

There are also view controllers that support safari and YouTube.
 

Three20 has a powerful table structure: cell/entry structure. It adds several special cell types based on the standard Apple cell types. It allows you to easily create table view controllers that contain embedded controls. For example:
 

 

If you wantProgramTo display a smaller activity indicator, you can use the activity label in three20, which provides the display method of indicator + TEXT + progress bar.
 

Use the ttlauncherview component to simulate the iPhone desktop.

Pagination labels on the top are supported.

Style)
Three20 style components can be easily declared and reused. You can use a few simple statements to create buttons, shadows, gradients, and borders that can be rounded. The following is an example of several style table elements:

 

Is three20 suitable for your project?

If we are creating a local application and need to communicate with the web API or access the Web slice, three20 will undoubtedly save a lot of time. If we do not need to do anything above, we can still find a lot of useful code in three20. In addition, three20 is based on the apache2.0 license. We can choose and use three20 as we like without worrying about the license.

To sum it up, we need it.

Now we understand some basic three20 concepts. Let's take a deeper look at it.

    • Add three20 to the created Project in the three20 Series
    • Use three20 to create a new project

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.