- Objective-C is not dead, it’s awesome, it’s a lovely language but you just won’t find a job if stick to it.
- Daniel misses the Objective-C’s
*
in Swift. Because that way he knows that something is (or isn’t) a reference type. He also misses header files because those are nice overviews of what he can call in a certain class. Otherwise, he loves Swift. - Context is important in code. If you would want to get
timeIntervalUntilNow
you need the inverse oftimeIntervalSinceNow
because the latter would return a negative number. Just putting a-
in front of it somewhere is bad, because there’s no context. Wrapping it in a method,-
is okay to put there. That provides context. SotimeIntervalUntilNow
would just return-timeIntervalSinceNow
. - Translating things from Objective-C to Swift is not thinking in Swift. Thinking in Swift doesn’t mean monads, map, flatmap, reduce and all the haskell stuff.
- If you use protocols, like
SequenceType
you get a lot
- Is on the raywenderlich.com team. Monthly newsletter, iOS animation by email.
- Animation calls on iOS are really easy. Lots of people feel like they will pick up animation along they. But then they don’t and they go to stack overflow and they pick up a bloated framework and everything is bloated and ugly and not how it has to be at all. These 3rd party libraries are slow, underperforming and way to heavy.
- The best way to learn about animation is by experimenting. There’s not many APIs so it isn’t super complicated to do that. Three steps:
- Get to know your APIs
- Try different properties
- Try new layers Many people don’t really discover all this which is partially Apple’s fault because they don’t supply the best docs on this.
UIView.animateWithDuration(…something…)
, in this method there’s spring APIs. Damping and initialSpringVelocity. Velocity is hard to explain. It represents the speed that the object init
PS: If you liked this talk or like this concept, let's chat about iOS development at Stitch Fix! #shamelessplug
Speaker: David Abrahams. (Tech lead for Swift standard library)
-
"Crusty" is an old-school programmer who doesn't trust IDE's, debuggers, programming fads. He's cynical, grumpy.
-
OOP has been around since the 1970's. It's not actually new.
-
Classes are Awesome
- Encapsulation
- Access control
- Introduction to Functional Programming Johannes Weiß - https://vimeo.com/100786088
- ReactiveCocoa at MobiDevDay Andrew Sardone - https://vimeo.com/65637501
- The Future Of ReactiveCocoa Justin Spahr-Summers - https://www.youtube.com/watch?v=ICNjRS2X8WM
- Enemy of the State Justin Spahr-Summers - https://www.youtube.com/watch?v=7AqXBuJOJkY
- WWDC 2014 Session 229 - Advanced iOS Application Architecture and Patterns Andy Matuschak - https://developer.apple.com/videos/play/wwdc2014/229/
- Functioning as a Functionalist Andy Matuschak - https://www.youtube.com/watch?v=rJosPrqBqrA
- Controlling Complexity in Swift Andy Matuschak - https://realm.io/news/andy-matuschak-controlling-complexity/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MKMapRect zoomRect = MKMapRectNull; | |
for (id <MKAnnotation> annotation in mapView.annotations) { | |
MKMapPoint annotationPoint = MKMapPointForCoordinate(annotation.coordinate); | |
MKMapRect pointRect = MKMapRectMake(annotationPoint.x, annotationPoint.y, 0, 0); | |
if (MKMapRectIsNull(zoomRect)) { | |
zoomRect = pointRect; | |
} else { | |
zoomRect = MKMapRectUnion(zoomRect, pointRect); | |
} | |
} |