Chapter One Project construction

Source: Internet
Author: User

This project is the "beginning iOS8 programming with Swift" project learning note = = "All Notes directory

--------------------------------------------------------------------------------------------------------------- ---

1. Create a new Single document view item Foodpin, and remove the use Size class tick.

2. Remove the default controller view and the corresponding class: Viewcontroller.swift.

3. Drag a tableviewcontroller to the interface and set it to initial View Controller.

4. Create a new class file that inherits from Uitableviewcontroller Resturanttableviewcontroller.swift, set as the interface controller class.

5. Set cell style to Bisic,identifier to Resturantcell.

6. Declaration of two member variables

name of all restaurants:
var restaurantnames = ["Cafe deadend","Homei","Teakha","Cafe LOISL","Petite Oyster","For Kee Restaurant","Po ' s Atelier","Bourke Street Bakery","Haigh ' s chocolate","Palomino Espresso","Upstate","Traif","Graham Avenue Meats","Waffle & Wolf","Five Leaves","Cafe Lore","Confessional","Barrafina","Donostia","Royal Oak","Thai Cafe "]

The corresponding picture name of all restaurants:

var restaurantimages = ["cafedeadend.jpg","homei.jpg","teakha.jpg","cafeloisl.jpg","petiteoyster.jpg","forkeerestaurant.jpg","posatelier.jpg","bourkestreetbakery.jpg","haighschocolate.jpg","palominoespresso.jpg","upstate.jpg","traif.jpg","grahamavenuemeats.jpg","wafflewolf.jpg","fiveleaves.jpg","cafelore.jpg","confessional.jpg","barrafina.jpg","donostia.jpg","royaloak.jpg","thaicafe.jpg"]

The data source method of the table is then implemented based on these two member variables.

Chapter I Project construction

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.