[Fall in love with Swift] phase 12: ToDoList Project

Source: Internet
Author: User

Long time did not write Swift is miss, Swift,xcode are more stable write a program familiar with, of course, the reason is small demo, nonsense not much to say first.

Here's what it looks like after running up:

Framework

First we open Xcode after the establishment of tabapplication, the default is to create two link tab viewcontroller, we will firstviewcontroller as a list of tablview;

Secondviewcontroller a list created as a task;

Creating a Core Todomanager program

So we have a business class class that maintains the task declaration cycle, and you can use Todomanager to create only one instance at a time.

Firstviewcontroller

As a list page, I dragged the tableview into view. At the same time for the view TableView establish DataSource proxy, delegate, the internal code is as follows:

The code implements the ToDoList to task display and deletes the task using the Delete method.

Secondviewcontroller

Here the main implementation of the task is added to the Todo list collection, the code is as follows:

Postscript

Very simple to code to implement a small app, of course, if take out to the words also need to work on the UI, but also I wait for the back-end programmer to the soft rib, swift graceful simple way to achieve iosapp development, but still look forward to the app There are more mature and commercially available Swift-based apps on the store.

[Fall in love with Swift] phase 12: ToDoList Project

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.