Skip to content

Commit

Permalink
156
Browse files Browse the repository at this point in the history
  • Loading branch information
stephencelis committed Aug 10, 2021
1 parent 47e2fba commit 5e53f5d
Show file tree
Hide file tree
Showing 16 changed files with 979 additions and 1 deletion.
2 changes: 1 addition & 1 deletion 0155-focus-state/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## [Point-Free](https://www.pointfree.co)

> #### This directory contains code from Point-Free Episode: [SwiftUI Focus State](https://www.pointfree.co/episodes/ep153-swiftui-focus-state)
> #### This directory contains code from Point-Free Episode: [SwiftUI Focus State](https://www.pointfree.co/episodes/ep155-swiftui-focus-state)
>
> Let’s explore another API just announced at WWDC: `@FocusState`. We’ll take a simple example and layer on some complexity, including side effects and testability, and we’ll see that the solution we land on works just as well in the Composable Architecture!
5 changes: 5 additions & 0 deletions 0156-searchable-pt1/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## [Point-Free](https://www.pointfree.co)

> #### This directory contains code from Point-Free Episode: [SwiftUI Focus State](https://www.pointfree.co/episodes/ep156-swiftui-searchable-part-1)
>
> Let’s develop a new application from scratch to explore SwiftUI’s new `.searchable` API. We’ll use MapKit to search for points of interest, and we will control this complex dependency so that our application can be fully testable.
19 changes: 19 additions & 0 deletions 0156-searchable-pt1/Search.playground/Contents.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import MapKit

let completer = MKLocalSearchCompleter()

class LocalSearchCompleterDelegate: NSObject, MKLocalSearchCompleterDelegate {
func completerDidUpdateResults(_ completer: MKLocalSearchCompleter) {
print("succeeded")
dump(completer.results)
}

func completer(_ completer: MKLocalSearchCompleter, didFailWithError error: Error) {
print("failed", error)
}
}

let delegate = LocalSearchCompleterDelegate()
completer.delegate = delegate

completer.queryFragment = "Apple Store"
4 changes: 4 additions & 0 deletions 0156-searchable-pt1/Search.playground/contents.xcplayground
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<playground version='5.0' target-platform='macos' importAppTypes='true'>
<timeline fileName='timeline.xctimeline'/>
</playground>
Loading

0 comments on commit 5e53f5d

Please sign in to comment.