thoughtbot Build Phase #13
thoughtbot Learn I'm a Professional! Episode #13
MapViewをカスタマイズとかするとき、overlayで面倒な部分があるみたいな話
細かい実装方法の話、いろいろパターンある
delegate, proxy, idにcastとか, intercept
NSProxyがよく分からない
decoratorパターン
mix conversation
green bubble
blue
iMessage
message still gets so confused
bad
sidebar
looks like static
ten years ago
tweetbot
close
own loading system
3 controller
subclass mkmapview
implement view for overlay
original delegate
response selector
obj c
message forwarding
passing message
only take two
set delegate
created delegate proxy
mk map view real delegate
cast id
lazy method resolution
normal forwarding
invocation expensive
hits proxy
intercepter
class checking
otherwise original delegate
response selector
take advantage
ns proxy is root object
when actually use ns proxy subclass
casting to id
pragma method
skeptical
compiler awesome
ruby
result would be same
interesting pattern
delegate proxy
decorator pattern
admin user class could intercept
admin user object
not subclass
just has user object
polymorphism
override specific things
tell dont ask
init with user
adminuser.init with user
problem type cast
have to treat differently
using type safety
have to use id everywhere
admin user is essentially proxy object
cannot set user value
user protocol
basic user admin user
composed object
main problem
not scalable
tradeoff
image for maptile
overlay
25 delegate methods