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