Upgrade to Pro — share decks privately, control downloads, hide ads and more …

實戰 Swift 3 升級

Johnlin
October 04, 2016

實戰 Swift 3 升級

Johnlin

October 04, 2016
Tweet

More Decks by Johnlin

Other Decks in Programming

Transcript

  1. ࢖༻ঋڃ޻۩ • ՄҎબᎩཁঋ౸ Swift 2.3 ҃ੋ Swift 3.0 • ။ઌ

    Build Ұ࣍ိ֬ఆཁࣗಈमվత஍ํɻ • ࠷ޙ҈ Save ब။ঋڃɻ
  2. SetIndex & DictionaryIndex • index.successor() Ꮣ੒ Collection.index(after: index) • index.predecessor()

    Ꮣ੒ Collection.index(before: index) • index.advancedBy(delta) Ꮣ੒ Collection.index(index, offsetBy: delta) • index.advancedBy(delta, limit: otherIndex) Ꮣ੒ Collection.index(index, offsetBy: delta, limitedBy: otherIndex) • index.distanceTo(otherIndex) Ꮣ੒ Collection.distance(from: index, to: otherIndex)
  3. ࣗݾሜత Collection Type • ݱࡏ Indexing ౎ੋ༝ Collection ؅ཧɻ •

    ࣗݾሜత Collection Type ཁࣗݾमվɻ • ී௨త Collection धཁ Collection.index(after: index) • ძ޲త धཁ Collection.index(before: index) • ᬋػଘऔత धཁ Collection.index(index, offsetBy: delta, limitedBy: otherIndex) ࿨ Collection.distance(from: index, to: otherIndex)
  4. Range త मվ • ݱࡏ Range ෆೳඃ iterate (for-in)ྃɼ୞༗ CountableRange

    ՄҎɻ • ೭લ༗໌֬એࠂ Range తՄҎߟྀվ੒ CountableRangeɻ
  5. NSURL & NSData • ݱࡏ༗ਖ਼ࣜతSwift ൛ຊɼURL & Dataɻ • େ෦෼။ࣗಈঋڃɼআඇ༗༻౸ෆࢧԉత

    APIɻ • ૾ੋ checkResourceIsReachableAndReturnError ब վ੒။㟚Exception త checkResourceIsReachable
  6. զ༗༻Cocoapods/Carthage 1. ៺᠃༻Swift 2.2 & Xcode 7.3 ௚౸ॴ༗ Package ౎

    ঋڃɻ 2. ሜ৴/ᚙ Tweet ڈޑჄݪ࡞ऀɻ 3. 㢨ଞम޷೭ޙᚙ Pull Requestɻ
  7. CI ઃఆ໵ཁঋڃ • CocoaPods 㗞ੜग़ိత workspace ᔒ༗ඪهቮঋڃ • ࡏCI ্။༗໰୊ɻ

    • ࢖༻ beta ൛ Cocoapods ɼ
 $ [sudo] gem install cocoapods --pre • ՃҰݸ㚎༰ੋ 3.0 త .swift-version 䈕څ CI ؃ɻ