Lazy Weather Small Item

Source: Internet
Author: User

Lazy weather Small project mainly achieved the city geographical positioning, show the local weather, according to your preference to choose different types of life widgets to get life advice. Show seven-day weather conditions in real time.

As follows:

The main contents used are:

1. Through the third-party class library Mmdrawercontroller to achieve the left and right sidebar, the sidebar shows the seven days of weather conditions, difficult to display the current position in the sidebar. How to use Mmdrawercontroller I have detailed instructions in the Mmdrawercontroller introduction.

2. Using Corelocation geo-location, the city code will be obtained, the city code is set to the value of the dictionary, sent to the network request, to obtain local weather conditions. The use of corelocation is relatively simple and is summarized in the corelocation introduction.

3. Sending a network request is added through the third-party class library afnetworking, which can be added via Cocopad or GitHub.

4. The Weather API interface used in this project mainly has k780 and Baidu weather, the data returned are JSON data, the request is get. Due to the limited number of k780 requests, after multiple debugs, a return data error is found. Baidu weather is relatively loose, can only return 7 days of weather data conditions.

5. Control selection interface, the selected control number and picture information into SQL, after exiting the selection interface, through the agent to remove the selection control data, and refresh to the main interface. The control number assigns the requested life data to the corresponding control, enabling the click Control to display the corresponding life information. Use a third-party class library fmdb to manage SQL. There is a simple summary of the use of the Fmdb class library.

6. The center of the view of the Heart button animation through the core animation Transform.scale to achieve its larger and smaller, set its opacity to achieve the head wind gradient.

7. The entire view is implemented by Uicollectionview, with the next three different cells set up and a collectionview in the lower cell, by Cgcontext to build a line chart that displays the highest and lowest temperatures more visually in the form of a line chart, Cgcontext Introduction, the drawing of the folding line is a simple introduction.

8. The press is using the HTML template to implement the news detail page, replacing the tags in the template to display different view content. See the use of HTML templates for details.

Lazy Weather Small Item

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.