Skip to content

Commit c5b5364

Browse files
committed
Updated code to Swift 2.2
Xcode 7.3 update
1 parent 444e059 commit c5b5364

File tree

7 files changed

+12
-7
lines changed

7 files changed

+12
-7
lines changed
Binary file not shown.

SwiftRadio.xcodeproj/xcuserdata/wu.xcuserdatad/xcschemes/xcschememanagement.plist

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@
1212
</dict>
1313
<key>SuppressBuildableAutocreation</key>
1414
<dict>
15+
<key>2C5545B91C1124DE00728469</key>
16+
<dict>
17+
<key>primary</key>
18+
<true/>
19+
</dict>
1520
<key>9409E1151ABF6FEA00312E2B</key>
1621
<dict>
1722
<key>primary</key>

SwiftRadio/AnimationFrames.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class AnimationFrames {
2020
}
2121
}
2222

23-
for (var i = 2; i > 0; i--) {
23+
for i in 2.stride(to: 0, by: -1) {
2424
if let image = UIImage(named: "NowPlayingBars-\(i)") {
2525
animationFrames.append(image)
2626
}

SwiftRadio/Base.lproj/Main.storyboard

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="9532" systemVersion="15D21" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="kdl-ej-Zz5">
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10116" systemVersion="15E65" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="kdl-ej-Zz5">
33
<dependencies>
44
<deployment identifier="iOS"/>
5-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9530"/>
5+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
66
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
77
</dependencies>
88
<scenes>
@@ -29,7 +29,7 @@
2929
<rect key="frame" x="0.0" y="22" width="320" height="88"/>
3030
<autoresizingMask key="autoresizingMask"/>
3131
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="hMr-La-1Ga" id="NhW-Qy-GCO">
32-
<rect key="frame" x="0.0" y="0.0" width="320" height="87"/>
32+
<rect key="frame" x="0.0" y="0.0" width="320" height="87.5"/>
3333
<autoresizingMask key="autoresizingMask"/>
3434
<subviews>
3535
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="stationImage" translatesAutoresizingMaskIntoConstraints="NO" id="GQm-Mf-6pw">

SwiftRadio/Libraries/Spring/KeyboardLayoutConstraint.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public class KeyboardLayoutConstraint: NSLayoutConstraint {
3333
offset = constant
3434

3535
NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(KeyboardLayoutConstraint.keyboardWillShowNotification(_:)), name: UIKeyboardWillShowNotification, object: nil)
36-
NSNotificationCenter.defaultCenter().addObserver(self, selector: "keyboardWillHideNotification:", name: UIKeyboardWillHideNotification, object: nil)
36+
NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(KeyboardLayoutConstraint.keyboardWillHideNotification(_:)), name: UIKeyboardWillHideNotification, object: nil)
3737
}
3838

3939
deinit {

SwiftRadio/Libraries/Spring/Misc.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ public func randomStringWithLength (len : Int) -> NSString {
142142

143143
let randomString : NSMutableString = NSMutableString(capacity: len)
144144

145-
for (var i=0; i < len; i++){
145+
for _ in 0..<len {
146146
let length = UInt32 (letters.length)
147147
let rand = arc4random_uniform(length)
148148
randomString.appendFormat("%C", letters.characterAtIndex(Int(rand)))

SwiftRadio/Libraries/SwiftyJSON.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ public struct JSONGenerator : GeneratorType {
384384
switch self.type {
385385
case .Array:
386386
if let o = self.arrayGenerate!.next() {
387-
return (String(self.arrayIndex++), JSON(o))
387+
return (String(self.arrayIndex += 1), JSON(o))
388388
} else {
389389
return nil
390390
}

0 commit comments

Comments
 (0)