نمایش نتایج 1 تا 3 از 3

نام تاپیک: link آموزش swift در Appstore

  1. #1
    کاربر دائمی آواتار MSHService
    تاریخ عضویت
    آذر 1387
    محل زندگی
    اکنون توی EJB
    پست
    207

    link آموزش swift در Appstore

    درود دوستان

    اپل دو تا کتاب برای آموزش سویفت منتشر کرده که خیلی با زبون رون توضیح داده

    The Swift Programming Language

    Using Swift with Cocoa and Objective-C

    کاش یه نفر آموزش این رو شروع میکرد.

    متاسفانه من مک ندارم و این xCode 6.1 هم حتما باید سیستم عامله مک 10.9.4 به بالا باشه که تا الان هکینتاشه 10.9.1 انتشار پیدا کرده :(


  2. #2
    کاربر دائمی آواتار MSHService
    تاریخ عضویت
    آذر 1387
    محل زندگی
    اکنون توی EJB
    پست
    207

    نقل قول: link آموزش swift در Appstore

    من مفهوم چند تا صفحه رو میزارم اینجا :

    برای شروع همیشه باید بتونیم Hello World رو تایپ کنیم که با دستور

    println("Hello, World)


    شما میتونید اینو انجام بدید ، شما هیچ لایبراری اضافی هم برای input/out ها نیاز ندارید :)

    برای تعریف متغییر هم از دستور var استفاده میکنیم

    var myVariable = 42


    این متغیر هم چون با یه مقدار int مقدار دهیه اولیه شده نوع Integer رو به خودش میگیره

    اگر متغیرمون (ثابتمون دسترو let) رو مقدار دهی اولیه نکنیم مچبوریم نوع اون رو بهش بگیم :

    let explicitDouble: Double = 70


    let lable = "The width is "
    let width = 94

    let widthLable = lable + String(width)

  3. #3
    کاربر دائمی آواتار MSHService
    تاریخ عضویت
    آذر 1387
    محل زندگی
    اکنون توی EJB
    پست
    207

    نقل قول: link آموزش swift در Appstore

    این تکه کوچیک و گویا هم از توی wikipedia اوردم :)

    // this is a single line comment using two slashes.

    /* this is also a comment,
    but written over multiple lines */

    /* multiline comments
    /* can be nested! */
    so that you can block out code containing multiline comments
    */

    // Swift variables are declared with "var" followed by a name, a type, and a value
    var explicitDouble: Double = 70

    // if the type is omitted, Swift will infer it from the variable's initial value
    var implicitInteger = 70
    var implicitDouble = 70.0
    var 国 = "日本"

    // Swift constants are declared with "let" followed by a name, a type, and a value
    let numberOfBananas: Int = 10

    // if the type is omitted, Swift will infer it from the constant's value
    let numberOfApples = 3
    let numberOfOranges = 5

    // values of variables and constants can be interpolated in strings as follows
    let appleSummary = "I have \(numberOfApples) apples."
    let fruitSummary = "I have \(numberOfApples + numberOfOranges) pieces of fruit."

    // in playgrounds, code can be placed in the global scope
    println("Hello, world")

    // define an array
    var fruits = ["mango", "kiwi", "avocado"]

    // example of if statement; .isEmpty, .count
    if fruits.isEmpty {
    println("No fruits in my array.")
    } else {
    println("There are \(fruits.count) items in my array")
    }

    // define a dictionary with four items, each with a person's name and age
    let people = ["Anna": 67, "Beto": 8, "Jack": 33, "Sam": 25]

    // now we use Swift's flexible enumerator system to extract both values in a single loop
    for (name, age) in people {
    println("\(name) is \(age) years old.")
    }

    // functions and methods are declared with the "func" syntax
    // the return type is specified with ->
    func sayHello(personName: String) -> String {
    let greeting = "Hello, " + personName + "!"
    return greeting
    }

    // prints "Hello, Jane!"
    println(sayHello("Jane"))

    // parameter names can be made external and required for calling
    // the external name can be the same as the parameter name by
    // prefixing with an octothorpe (#)
    // or can be defined separately.
    func sayAge(#personName: String, personAge Age: Int) -> String {
    let result = "\(personName) is \(Age) years old."
    return result
    }

    // we can also specify the name of the parameter
    println(sayAge(personName: "Jane", personAge: 42))

تاپیک های مشابه

  1. حرفه ای: آموزش اتصال به بانک Access از طریق شبکه و Linked Table
    نوشته شده توسط kitcat_m18 در بخش مطالب مرتبط با بانکهای اطلاعاتی در VB6
    پاسخ: 3
    آخرین پست: دوشنبه 04 دی 1391, 20:34 عصر
  2. The procedure entry point@sysutils@checkwin32version$qqrii could not be located in the dynamic link
    نوشته شده توسط در بخش مباحث عمومی دلفی و پاسکال
    پاسخ: 4
    آخرین پست: جمعه 20 فروردین 1389, 21:10 عصر
  3. آموزش سی شارپ
    نوشته شده توسط ehsan-ets در بخش C#‎‎
    پاسخ: 15
    آخرین پست: پنج شنبه 27 اردیبهشت 1386, 19:16 عصر
  4. آموزش کامل ASP.Net
    نوشته شده توسط mostafa_pk در بخش ASP.NET Web Forms
    پاسخ: 2
    آخرین پست: چهارشنبه 22 شهریور 1385, 18:20 عصر

قوانین ایجاد تاپیک در تالار

  • شما نمی توانید تاپیک جدید ایجاد کنید
  • شما نمی توانید به تاپیک ها پاسخ دهید
  • شما نمی توانید ضمیمه ارسال کنید
  • شما نمی توانید پاسخ هایتان را ویرایش کنید
  •