Skip to content

Commit c9fd456

Browse files
Updated for Xcode 6.1
Mostly failable initialisers
1 parent 780f4f6 commit c9fd456

7 files changed

+102
-17
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDESourceControlProjectFavoriteDictionaryKey</key>
6+
<false/>
7+
<key>IDESourceControlProjectIdentifier</key>
8+
<string>6307F97F-D48E-4985-B266-58E46C5E8C2D</string>
9+
<key>IDESourceControlProjectName</key>
10+
<string>ReactiveSwiftFlickrSearch</string>
11+
<key>IDESourceControlProjectOriginsDictionary</key>
12+
<dict>
13+
<key>2FD0F96481B39E576130E173BF6923CF52C91FF7</key>
14+
<string>git://github.com/github/specta.git</string>
15+
<key>51B210D0D41486D3ADD6940D57E4480BBD4DE4C5</key>
16+
<string>https://github.com/yusefnapora/ReactiveCocoa.git</string>
17+
<key>8884BD3B878631A1500EC9895E6A3CF4CB0AB3DB</key>
18+
<string>git://github.com/github/expecta.git</string>
19+
<key>9E3183DE297D66F5206118DE938F0CE0ACB16047</key>
20+
<string>https://github.com/ColinEberhardt/ReactiveSwiftFlickrSearch.git</string>
21+
<key>E084C86B03F81D63323C9E7510697EA528A758C7</key>
22+
<string>https://github.com/jspahrsummers/xcconfigs.git</string>
23+
</dict>
24+
<key>IDESourceControlProjectPath</key>
25+
<string>ReactiveSwiftFlickrSearch.xcworkspace</string>
26+
<key>IDESourceControlProjectRelativeInstallPathDictionary</key>
27+
<dict>
28+
<key>2FD0F96481B39E576130E173BF6923CF52C91FF7</key>
29+
<string>..ReactiveCocoa/external/specta/</string>
30+
<key>51B210D0D41486D3ADD6940D57E4480BBD4DE4C5</key>
31+
<string>..ReactiveCocoa/</string>
32+
<key>8884BD3B878631A1500EC9895E6A3CF4CB0AB3DB</key>
33+
<string>..ReactiveCocoa/external/expecta/</string>
34+
<key>9E3183DE297D66F5206118DE938F0CE0ACB16047</key>
35+
<string>..</string>
36+
<key>E084C86B03F81D63323C9E7510697EA528A758C7</key>
37+
<string>..ReactiveCocoa/external/xcconfigs/</string>
38+
</dict>
39+
<key>IDESourceControlProjectURL</key>
40+
<string>https://github.com/ColinEberhardt/ReactiveSwiftFlickrSearch.git</string>
41+
<key>IDESourceControlProjectVersion</key>
42+
<integer>111</integer>
43+
<key>IDESourceControlProjectWCCIdentifier</key>
44+
<string>9E3183DE297D66F5206118DE938F0CE0ACB16047</string>
45+
<key>IDESourceControlProjectWCConfigurations</key>
46+
<array>
47+
<dict>
48+
<key>IDESourceControlRepositoryExtensionIdentifierKey</key>
49+
<string>public.vcs.git</string>
50+
<key>IDESourceControlWCCIdentifierKey</key>
51+
<string>8884BD3B878631A1500EC9895E6A3CF4CB0AB3DB</string>
52+
<key>IDESourceControlWCCName</key>
53+
<string>expecta</string>
54+
</dict>
55+
<dict>
56+
<key>IDESourceControlRepositoryExtensionIdentifierKey</key>
57+
<string>public.vcs.git</string>
58+
<key>IDESourceControlWCCIdentifierKey</key>
59+
<string>51B210D0D41486D3ADD6940D57E4480BBD4DE4C5</string>
60+
<key>IDESourceControlWCCName</key>
61+
<string>ReactiveCocoa</string>
62+
</dict>
63+
<dict>
64+
<key>IDESourceControlRepositoryExtensionIdentifierKey</key>
65+
<string>public.vcs.git</string>
66+
<key>IDESourceControlWCCIdentifierKey</key>
67+
<string>9E3183DE297D66F5206118DE938F0CE0ACB16047</string>
68+
<key>IDESourceControlWCCName</key>
69+
<string>ReactiveSwiftFlickrSearch</string>
70+
</dict>
71+
<dict>
72+
<key>IDESourceControlRepositoryExtensionIdentifierKey</key>
73+
<string>public.vcs.git</string>
74+
<key>IDESourceControlWCCIdentifierKey</key>
75+
<string>2FD0F96481B39E576130E173BF6923CF52C91FF7</string>
76+
<key>IDESourceControlWCCName</key>
77+
<string>specta</string>
78+
</dict>
79+
<dict>
80+
<key>IDESourceControlRepositoryExtensionIdentifierKey</key>
81+
<string>public.vcs.git</string>
82+
<key>IDESourceControlWCCIdentifierKey</key>
83+
<string>E084C86B03F81D63323C9E7510697EA528A758C7</string>
84+
<key>IDESourceControlWCCName</key>
85+
<string>xcconfigs</string>
86+
</dict>
87+
</array>
88+
</dict>
89+
</plist>

ReactiveSwiftFlickrSearch/Model/FlickrSearchImpl.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class FlickrSearchImpl : NSObject, FlickrSearch, OFFlickrAPIRequestDelegate {
3939
let url = self.flickrContext.photoSourceURLFromDictionary(photoDict, size: OFFlickrSmallSize)
4040
return FlickrPhoto(title: photoDict["title"]!, url: url, identifier: photoDict["id"]!)
4141
}
42-
let total = response.valueForKeyPath("photos.total").integerValue
42+
let total = response.valueForKeyPath("photos.total")!.integerValue
4343
return FlickrSearchResults(searchString: searchString, totalResults: total, photos: photos)
4444
}
4545

ReactiveSwiftFlickrSearch/Util/TableViewBindingHelper.swift

+5-5
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class TableViewBindingHelper: NSObject, UITableViewDataSource, UITableViewDelega
3636

3737
// create an instance of the template cell and register with the table view
3838
templateCell = nib.instantiateWithOwner(nil, options: nil)[0] as UITableViewCell
39-
tableView.registerNib(nib, forCellReuseIdentifier: templateCell.reuseIdentifier)
39+
tableView.registerNib(nib, forCellReuseIdentifier: templateCell.reuseIdentifier!)
4040

4141
super.init()
4242

@@ -52,13 +52,13 @@ class TableViewBindingHelper: NSObject, UITableViewDataSource, UITableViewDelega
5252

5353
//MARK: Private
5454

55-
func tableView(tableView: UITableView!, numberOfRowsInSection section: Int) -> Int {
55+
func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
5656
return data.count
5757
}
58-
59-
func tableView(tableView: UITableView!, cellForRowAtIndexPath indexPath: NSIndexPath!) -> UITableViewCell! {
58+
59+
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
6060
let item: AnyObject = data[indexPath.row]
61-
let cell = tableView.dequeueReusableCellWithIdentifier(templateCell.reuseIdentifier) as UITableViewCell
61+
let cell = tableView.dequeueReusableCellWithIdentifier(templateCell.reuseIdentifier!) as UITableViewCell
6262
if let reactiveView = cell as? ReactiveView {
6363
reactiveView.bindViewModel(item)
6464
}

ReactiveSwiftFlickrSearch/View/FlickrSearchViewController.swift

+3-7
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,10 @@ class FlickrSearchViewController: UIViewController {
5757
alert.show()
5858
}
5959

60-
// for some reason having this code within the subscribeNext closure
61-
// causes a build error
62-
func resign() -> () {
63-
searchTextField.resignFirstResponder()
64-
}
65-
viewModel.executeSearch.executionSignals.subscribeNext{(any:AnyObject!) -> () in
66-
resign()
60+
func hideKeyboard(any: AnyObject!) {
61+
self.searchTextField.resignFirstResponder()
6762
}
63+
viewModel.executeSearch.executionSignals.subscribeNext(hideKeyboard)
6864
}
6965

7066
}

ReactiveSwiftFlickrSearch/View/RecentSearchItemTableViewCell.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class RecentSearchItemTableViewCell: UITableViewCell, ReactiveView {
2121
totalResultsLabel.text = "\(previousSearch.totalResults)"
2222

2323
let data = NSData(contentsOfURL: previousSearch.thumbnail)
24-
let image = UIImage(data: data)
24+
let image = UIImage(data: data!)
2525
thumbnailImage.image = image
2626
}
2727
}

ReactiveSwiftFlickrSearch/View/SearchResultsTableViewCell.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class SearchResultsTableViewCell: UITableViewCell, ReactiveView {
5757
let signal = RACSignal.createSignal({
5858
(subscriber: RACSubscriber!) -> RACDisposable! in
5959
let data = NSData(contentsOfURL: imageUrl)
60-
let image = UIImage(data: data)
60+
let image = UIImage(data: data!)
6161
subscriber.sendNext(image)
6262
subscriber.sendCompleted()
6363
return nil

ReactiveSwiftFlickrSearch/View/SearchResultsViewController.xib

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6185.11" systemVersion="13D65" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6250" systemVersion="14A389" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
33
<dependencies>
4-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6190.4"/>
4+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6244"/>
55
</dependencies>
66
<objects>
77
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="SearchResultsViewController" customModule="ReactiveSwiftFlickrSearch" customModuleProvider="target">

0 commit comments

Comments
 (0)