Commit da190069 authored by O'Reilly Media, Inc.'s avatar O'Reilly Media, Inc.
Browse files

Initial commit

parents
Loading
Loading
Loading
Loading
+7 −0
Changes for Mixed Language App Development with Objective-C and Swift - Working Files/Chapter 1/No Work Files.rtf: 7 added lines, 0 removed lines.
Original line number Diff line number Diff line
{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf350
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
{\colortbl;\red255\green255\blue255;}
\margl1440\margr1440\vieww9000\viewh8400\viewkind0
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural

\f0\fs24 \cf0 No work files for this lesson...}
 No newline at end of file
+8.32 KiB

File added.

No diff preview for this file type.

+36.3 KiB

File added.

No diff preview for this file type.

+17 −0
Changes for Mixed Language App Development with Objective-C and Swift - Working Files/Chapter 11/GenericPlayground.playground/Contents.swift: 17 added lines, 0 removed lines.
Original line number Diff line number Diff line
class MyClass {
    
    // using a tuple to return values 
    
    func myFunc (a:Int, b:String) -> (FirstElement: Int, SecondElement: String) {
        return (a, b)
    }
}

var myInstance = MyClass ()

var x = myInstance.myFunc (47, b: "This is my string")

print (x.0)
print (x.1)
print (x.FirstElement)
print (x.SecondElement)
Loading