Swift Side-Open menu

Source: Internet
Author: User

This article from the study of this blog after the study notes, the original blog is written in OC, I recently learning swift, so rewrite to Swift.

It is convenient to call each other between Swift and OC, but pay attention to the use of anyobject and optional, which I now understand

is not very deep. Also, because swift updates quickly, many documents are not updated, or you want to jump to a statement in Xcode.

This time met a problem in the UITableView, spent a day to solve (previously thought to be OC and Swift call each other

The problem, later with the elimination of the law, the UITableView, and then spent half a day, a function declaration to view, before

found that the function declaration has changed).

The above mentioned blog has been written in very detailed, is implemented with Ghsidebarnav, I briefly say, to give it a

Controller on it, this controller is usually used Uitableviewcontroller, and then in the TableView click

event, call Togglesidebar.

Also pay attention to the Uistoryborad order of this instantiateviewcontrollerwithidentifier, without looking at

The specific implementation, after output log, found in the display to the screen is not instantiated.

Click to download the code.

Beginner oc and Swift, I hope you will correct me.

Swift Side-Open menu

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.