Under the Radar 48: Late Bloomers
◼
►
welcome to under the radar a show about
◼
►
independent iOS app development I'm
◼
►
Marco Arment and I'm David Smith under
◼
►
the radar is never longer than 30
◼
►
minutes so let's get started today we
◼
►
want to talk about a topic that is near
◼
►
and dear to me it is coming late to
◼
►
things being late bloomers to new
◼
►
technologies and new techniques or new
◼
►
abilities things like interface builder
◼
►
use things like you know if you
◼
►
controller containment you know they
◼
►
basically things that that I either
◼
►
didn't do early on or that I minimally
◼
►
used early on or just never even gave a
◼
►
shot and and that I later and more
◼
►
recently have come to come to realize oh
◼
►
this is actually useful or even maybe
◼
►
now it's useful you know maybe it wasn't
◼
►
that useful in 1.0 but maybe now it has
◼
►
become more useful over time as Apple
◼
►
has made these things better this
◼
►
happens to me all the time my default
◼
►
reaction to new technologies coming
◼
►
coming by is I probably don't need that
◼
►
because much of the time that's true but
◼
►
but that that attitude makes it hard to
◼
►
find those times when it's not true and
◼
►
it often makes me come late to things
◼
►
now the benefit of coming late to things
◼
►
any of the issues that 1.0 brought those
◼
►
have probably been worked out or you
◼
►
will have heard from a bunch of people
◼
►
like this this technology or this thing
◼
►
is not worth using but the ones that are
◼
►
worth using by the time you come late to
◼
►
them yeah you've missed some time of
◼
►
potential improvements and efficiencies
◼
►
and everything but when you get there
◼
►
it's really awesome and easy to use and
◼
►
the tools are better and everything's
◼
►
so it isn't all bad being being a
◼
►
conservative curmudgeon like I am about
◼
►
new technologies are you that way at all
◼
►
yes so I I'm a very strange person in
◼
►
terms of I have like these two different
◼
►
mindsets when it comes to like new
◼
►
technology so you know wEDC
◼
►
Apple announces here's the whole new set
◼
►
of stuff that are nowadays now available
◼
►
for Apple developers and I get really
◼
►
excited and look into and very often
◼
►
start using like totally new
◼
►
technologies you know things that
◼
►
weren't possible before that are now
◼
►
possible and I'll be one of the first
◼
►
people in the world to run down that and
◼
►
try and use it and see we're all it's
◼
►
often it's you know kind of whore half
◼
►
broken and the beta period is really
◼
►
tricky but I like that part of the
◼
►
development cycle and enjoy it
◼
►
whenever Apple introduces something that
◼
►
is a a replacement or extension to
◼
►
something existing you know and so this
◼
►
is a pattern that I think Apple I've
◼
►
seen Apple do many times you know I
◼
►
started developing on iPhone OS 2.2 I
◼
►
think was the first OS version that I
◼
►
was building against Wow it was just way
◼
►
back in the day and you see what it took
◼
►
to build something then and now so much
◼
►
of the stuff that we would write custom
◼
►
you know custom frameworks for or have
◼
►
to do ourselves is now just like built
◼
►
into the system they're all these things
◼
►
that you know a problem that we had to
◼
►
solve manually or directly before and
◼
►
then Apple comes along and says you know
◼
►
enough people are doing this that we
◼
►
should probably create a system method
◼
►
for doing this that'll be more stable
◼
►
and almost certainly more better
◼
►
resilient against iOS changes you know
◼
►
cuz I you know like when iOS 9 goes to
◼
►
iOS 10 Apple's gonna make sure that you
◼
►
know collectionview still works
◼
►
whereas if I've had my own custom
◼
►
collection view class suddenly I'm the
◼
►
one who has to go in and make all the
◼
►
changes to make sure that it works
◼
►
nicely on the new OS and so Apple is
◼
►
rightfully so extending and expanding
◼
►
the universe of things that we can do
◼
►
but I always struggle with the feeling
◼
►
of if I have an existing solution for
◼
►
something that kind of works and that
◼
►
I'm familiar with is a really a hard
◼
►
sell to kind of tear down everything
◼
►
that I built and then replace it with
◼
►
apples thing and especially like you
◼
►
said early on because in that early
◼
►
phase is when there's the most bugs and
◼
►
then you can have the really bad feeling
◼
►
of like regret where it's like oh I
◼
►
should just go back to doing it the way
◼
►
that I used to do it because I knew that
◼
►
I knew at least I knew where all the
◼
►
problems were if there was a bug I could
◼
►
fix it and that was the you know a
◼
►
mindset that's a very easy trap to get
◼
►
into but on the flip side I definitely
◼
►
look at some of these things and I
◼
►
wonder if I'm missing out and history
◼
►
maybe has shown them some ways I'm
◼
►
missing out in some ways I'm not you
◼
►
know obviously the best thing is when
◼
►
you see a technology fly by you don't
◼
►
embrace it and then it ends up dying
◼
►
you know like iCloud core data sync for
◼
►
example like as a technology that when
◼
►
it came out I was like
◼
►
that is interesting like I use core data
◼
►
and I sync data to a server I wonder if
◼
►
this would be cool and I kind of poked
◼
►
my veena poked around a little bit but
◼
►
never really went down their road
◼
►
because I had an existing infrastructure
◼
►
because it turns out that was a great
◼
►
situation right I think that was you
◼
►
know officially killed this last summer
◼
►
and if I had gone all gone all you know
◼
►
all in on that I would have been in a
◼
►
world of hurt but on the flip side here
◼
►
if I had seen cloud kit when it came out
◼
►
and went in on that that's the vastness
◼
►
a technology that seems to be ascendant
◼
►
that seems to be on its way up and so at
◼
►
this point this part it's like huh maybe
◼
►
I should be using that maybe that would
◼
►
be a wise thing for me to be using and
◼
►
having the benefit of time makes that
◼
►
choice a lot easier I think and so you
◼
►
there is certainly a benefit to if a
◼
►
technology is being replaced and/or
◼
►
improved upon that I think you can be
◼
►
more conservative than if it's something
◼
►
you know then just go for it and try it
◼
►
and you know if it doesn't work well
◼
►
yeah what have you lost but that having
◼
►
being a bit more conservative when it's
◼
►
something that is just an extension for
◼
►
me in any way feels like the right
◼
►
approach it also it helps to you know as
◼
►
you mentioned like catching things when
◼
►
they're when they're ascendant that
◼
►
really helps with keeping up with Apple
◼
►
basically keeping up with the new
◼
►
devices that launch new OS capabilities
◼
►
Apple makes it easy on you if you kind
◼
►
of follow their guidelines if you if you
◼
►
kind of like take like the tracks they
◼
►
lay out for you like they pave out a way
◼
►
that they want you to do things whether
◼
►
it's the language choice in this case
◼
►
they do now its Swift whether it's
◼
►
things like using interface builder
◼
►
using storyboards you know using
◼
►
adaptive layouts like all these things
◼
►
like Apple makes things easy to do
◼
►
things their way and then generally
◼
►
speaking if you do things their way you
◼
►
will have less friction or things will
◼
►
be easier for you in the near future as
◼
►
they introduce new technologies new
◼
►
devices things like that and and you
◼
►
don't have to do things their way but if
◼
►
you don't you're generally setting
◼
►
yourself up for more work like for me
◼
►
one of the biggest things about that was
◼
►
was when they brought an adaptive
◼
►
for the iPad like that that changed a
◼
►
lot of things for a lot of people
◼
►
because like if you if you had first of
◼
►
all feel like a separate iPad app and an
◼
►
iPhone app that broke everything because
◼
►
all of a sudden Lee well now your iPad
◼
►
app kind of has a reason to have the
◼
►
entire iPhone app with it so that it can
◼
►
run in skinny mode on the sidebar and if
◼
►
you if you were doing things in a basic
◼
►
way with like a typical you know UI
◼
►
split view controller things like that
◼
►
like then things were easier for you but
◼
►
if you if you were you know away from
◼
►
the Apple way you had more work to do I
◼
►
think - it's an interesting point about
◼
►
how Apple tends to strongly sort of
◼
►
Telegraph where they're going yeah with
◼
►
their announcements that this has been a
◼
►
pattern that we've seen many times where
◼
►
Apple introduces a you know a they solve
◼
►
a problem or they make something easier
◼
►
that you know either you know end of
◼
►
that fall sometimes when it's yeah I
◼
►
remember when you know they first
◼
►
changed the size of the iPhone like that
◼
►
was the year that we got Auto layout if
◼
►
and like they do those kinds of moves
◼
►
where they can because obviously they
◼
►
know what their road map is for the next
◼
►
six months for the next year for the
◼
►
next two years and they can look forward
◼
►
to what that look what that's going to
◼
►
be and start preparing you know pairing
◼
►
the ground for what that's what's going
◼
►
to make development on that platform the
◼
►
best now and so there's definitely a
◼
►
wisdom in looking at what what in order
◼
►
these new technologies and extensions
◼
►
that they're adding to the to the
◼
►
frameworks that what is like asking
◼
►
yourself well what could this mean like
◼
►
they started adding the size classes and
◼
►
there's I always remember there was in
◼
►
the first size class WC session where
◼
►
there's like they have the quadrant of
◼
►
like the compact and wide and so they
◼
►
have like this one is this you know
◼
►
these devices fall in this category this
◼
►
these devices fall in this category
◼
►
these devices fall in this category and
◼
►
this to this category we don't actually
◼
►
have any devices that category yet and
◼
►
obviously like super visual you could
◼
►
say like huh you know that's just the
◼
►
way it fell out it's like no Apple is
◼
►
actually telling us that I think in that
◼
►
case it was the I believe it was the the
◼
►
6 plus and landscape which which has I
◼
►
believe it has the the normal which is
◼
►
chantal class and the compact vertical
◼
►
class yeah exactly like those types of
◼
►
things like Apple is telling you
◼
►
something there and so being aware of it
◼
►
even if you're not going to adopt the
◼
►
new technology it's probably a good
◼
►
thing to be kind of suspicious when they
◼
►
start changing things to see like what
◼
►
could this mean down the road cuz
◼
►
they're not gonna waste their time just
◼
►
adding you know adding stuff for no
◼
►
yeah I mean one of the things for me
◼
►
that so to get into some specific
◼
►
examples here one of the things for me
◼
►
in this area was viewcontroller
◼
►
containment or have having child view
◼
►
controllers basically and implementing
◼
►
your own parent view controllers and you
◼
►
know for I think for most iOS developers
◼
►
you've seen you know kind of view
◼
►
controller bloat disease it is so easy
◼
►
to have tons of code in view controllers
◼
►
because that's kind of just where
◼
►
everything falls and I know there's
◼
►
different models there's like mvvm and
◼
►
stuff I haven't like gotten some any of
◼
►
those yet so I can't really speak to
◼
►
them but every iOS developer has seen
◼
►
the the massive view controller syndrome
◼
►
and one of the things that helps that a
◼
►
lot is by making child view controller
◼
►
so like you know like an overcast you
◼
►
know I'll have like different panels and
◼
►
everything and rather than having like
◼
►
on the nap playing screen they're like
◼
►
the effects panel rather than having
◼
►
that be part of the now playing view
◼
►
controller that is its own view
◼
►
controller that can be presented or
◼
►
stuck in various places you know just
◼
►
using the stock stuff using things like
◼
►
popovers and split views and navigation
◼
►
of course you know all these things page
◼
►
view controllers using all those things
◼
►
can get you very very far but one of the
◼
►
biggest things I've done recently I
◼
►
started making my own parent view
◼
►
controllers also now one of the things I
◼
►
did was I I have replaced UI split view
◼
►
controller with my own custom version of
◼
►
something that does fairly similar
◼
►
things but does them kind of more my way
◼
►
because when I when I was looking at
◼
►
overcast code I have spent so much time
◼
►
and there were so much like hacky weird
◼
►
like configuration and exception code
◼
►
things like in you know intercepting
◼
►
traitcollection changes and weird things
◼
►
like that all to get UI split view
◼
►
controller to do what I wanted the
◼
►
amount of code I have to just bend this
◼
►
existing component to my will is so much
◼
►
and so fragile and and so hacky I can
◼
►
actually make my own split view
◼
►
equivalent controller that just does
◼
►
things the way I want them to want the
◼
►
way I want it to with actually far less
◼
►
code like buy it by a mile
◼
►
because the built-in components they
◼
►
have all these limitations in place that
◼
►
you know Apple thinks they should be
◼
►
designed this way but the reason one of
◼
►
the reasons necessary is because like
◼
►
they have all these different options
◼
►
and how you can configure them if they
◼
►
have to work in all the different ways
◼
►
they have they can't make as many
◼
►
assumptions as you can
◼
►
they can't rule out certain options that
◼
►
you won't use so in their
◼
►
implementations they're never going to
◼
►
accommodate everything but at the same
◼
►
time they have to be like so complex to
◼
►
accommodate all the things they do
◼
►
manage to to encompass when you make one
◼
►
for yourself you can do anything you
◼
►
want and only what you want and that's
◼
►
incredibly powerful and you know writing
◼
►
everything yourself is not always the
◼
►
best solution that's not always a good
◼
►
use of time but in cases like this like
◼
►
I've been fighting with UI splitview
◼
►
controller and and various like adaptive
◼
►
layout things for over a year now and
◼
►
it's just like this I I don't need to do
◼
►
this like why am I doing this when I
◼
►
could just write and so I took one day
◼
►
like let me see if I can write my own in
◼
►
one day and sure enough of course it was
◼
►
it was easier than I ever imagined
◼
►
because the the you know if you control
◼
►
containment stuff is very much here and
◼
►
how it's it's been a wrap for a while I
◼
►
think was ins Iowa it's like five or six
◼
►
it's it's kind of old right six I think
◼
►
yeah yeah so it's been out for a while
◼
►
so all the stuff was very very easy to
◼
►
do I also made a custom UI page view
◼
►
controller it basically didn't I want to
◼
►
do some some custom gesture and view
◼
►
handling that it just was not capable of
◼
►
doing without tons of hacks so I just
◼
►
made my own and my the one I made is not
◼
►
as good as theirs for general purpose
◼
►
use but for my use it's way better and
◼
►
it really is not that much code and it
◼
►
it's more it's more of like basically
◼
►
removing times where you have to really
◼
►
hack with UI kit because you like it's
◼
►
so complex there's so much there that it
◼
►
has to do and so much of my of my time
◼
►
designing interfaces in the past has
◼
►
been fighting UI kit to just try to
◼
►
customize something the way I want it
◼
►
and over time it's become easier but
◼
►
there's still places where you have to
◼
►
do it especially like around new
◼
►
technologies like adaptive UI and stuff
◼
►
like that when those things kind of come
◼
►
out and so to to hit yourself out of the
◼
►
business of hacking UI kit is so freeing
◼
►
and so so good for your overall code
◼
►
health and technical debt I highly
◼
►
recommend it and one of the biggest ways
◼
►
is view controller that you basically
◼
►
use and view controllers properly and
◼
►
not trying to hack the existing ones if
◼
►
they don't fit your needs
◼
►
yeah but I think what you're speaking
◼
►
there is such the strange tension that
◼
►
when you are looking at these new
◼
►
technologies because the base building
◼
►
blocks in iOS are overall I would say
◼
►
really really good like the number of
◼
►
things that you can build was just a
◼
►
his immense like I mean I was one of my
◼
►
favorite talks wotc I don't know if they
◼
►
did one this last year because I
◼
►
previously had always been like what's
◼
►
new in UI scrollview mmm and they would
◼
►
build these really sophisticated
◼
►
interactions that were just a scrollview
◼
►
at the end of the day and but it's that
◼
►
strange tension where if you use a page
◼
►
controller like it's like you can get
◼
►
that first thing working really quickly
◼
►
but you very cool you'll start to run
◼
►
out of runway and it's a question I
◼
►
suppose of how much control you want to
◼
►
have and how much you want to be
◼
►
responsible for all the weird edge cases
◼
►
all the strange issues that are gonna
◼
►
happen I suppose either way if you use
◼
►
UI page controller like there's just
◼
►
gonna be there's gonna be some issues
◼
►
that you just can't work around and
◼
►
you're just like oh well like it just
◼
►
doesn't work the way I like it to in
◼
►
this particular situation so then you're
◼
►
like okay let me just build my own and
◼
►
now of course you're like the important
◼
►
thing I think maybe is to say is when
◼
►
you do that you are it's good to be sort
◼
►
of cognizant and keep your eyes open for
◼
►
what you're taking on when you do that
◼
►
because you know apples engineering
◼
►
teams are know like they're not they're
◼
►
no slouches like they are really good at
◼
►
what they're doing and it takes a lot of
◼
►
engineering work to build the UI
◼
►
pagecontroller for example like that's
◼
►
not just a simple thing they threw
◼
►
together in a day and so if you're gonna
◼
►
replace it you probably need to be aware
◼
►
that you're it's gonna be a lot more
◼
►
work than you think and there's gonna be
◼
►
weird edges and problems that you're
◼
►
gonna have to run into you like I
◼
►
remember this with activity plus plus
◼
►
where it has this kind of custom
◼
►
animation where you starts off with the
◼
►
Rings and if you tap it like the Rings
◼
►
unfurl and turn into the bar graph which
◼
►
is this kind of cool animation that I
◼
►
thought of and I was like oh I really
◼
►
want to build this and I started to see
◼
►
if I could build this with UI view
◼
►
because I would far prefer to do it with
◼
►
some kind of built-in mechanism and in
◼
►
the end I couldn't because just it was
◼
►
just too complicated of a thing to get
◼
►
performant and to get to look right and
◼
►
so I ended up just building it myself
◼
►
using like raw core graphics that I you
◼
►
know I do the animation of each frame of
◼
►
that animation and draw its you know
◼
►
just like I'm just essentially just
◼
►
drawing that to a bit a bitmap and
◼
►
displaying it each frame which is great
◼
►
it looks just how I want it but it means
◼
►
there's all kinds of weird issues and
◼
►
performance problems and compatibility
◼
►
things between different platforms that
◼
►
if I was just using UI view animation
◼
►
just wouldn't happen and so really the
◼
►
trade-off was worth it like I couldn't
◼
►
do it at the other way but I kind of
◼
►
wish that I was able to use do so do it
◼
►
the other way and I think that's
◼
►
something when I don't think of these
◼
►
new technologies that Apple puts out
◼
►
like there's this I definitely always
◼
►
have that tugging sense of aw man I wish
◼
►
I could just use whatever it is I wish I
◼
►
could just use auto layout I wish I
◼
►
could just use size classes but then as
◼
►
soon as I hit that edge I have such this
◼
►
tension it's just saying like oh I'll
◼
►
just throw my hands up and walk away
◼
►
which is perhaps a bit childish well but
◼
►
you know it's you have to always be
◼
►
defensive of your time like when you're
◼
►
when you're trying out something new or
◼
►
when you're thinking about rewriting a
◼
►
system component for your own use like
◼
►
it's very easy to fall into a time hole
◼
►
here and just burn tons of time doing
◼
►
something that actually isn't productive
◼
►
part of the the judgement of when to do
◼
►
that and when not to just comes with
◼
►
doing it wrong for a number of years and
◼
►
eventually gaining that wisdom and part
◼
►
of it is kind of just luck you know a
◼
►
lot of times you can't really tell
◼
►
what's gonna be a good use of your time
◼
►
upfront but you know that's the risk you
◼
►
take with new stuff all right a sponsor
◼
►
this week is Braintree go to Braintree
◼
►
payments comm slash radar by next year
◼
►
maybe even next week there could be a
◼
►
whole new way to pay for things maybe
◼
►
it'll be the next Bitcoin or the next
◼
►
Apple pay or maybe even both fortunately
◼
►
Braintree its full stack payment
◼
►
platform is easily adaptable to whatever
◼
►
the future holds so you can adapt easily
◼
►
to if you use Braintree in your apps you
◼
►
can accept everything from pounds to
◼
►
PayPal to whatever the next big
◼
►
innovation is from any device with just
◼
►
one integration and when that new
◼
►
payment method comes out all you have to
◼
►
do is update a few lines of
◼
►
no late nights no complicated recoding
◼
►
no stress about staying ahead of the
◼
►
Braintree is here to help you find out
◼
►
more at Braintree payments comm slash
◼
►
that's Braintree payments comm / radar
◼
►
thank you very much to Braintree for
◼
►
sponsoring our show one other thing that
◼
►
I was thinking about with this topic
◼
►
though is it's something that I wrote
◼
►
that I you run into if you are behind
◼
►
the times like I'm very often behind the
◼
►
way you know like Apple has this new
◼
►
technology this new approach that
◼
►
they're recommending and I'm late in
◼
►
adopting it the thing that I always
◼
►
noticed too is that you'll run into that
◼
►
can be really annoying is suddenly all
◼
►
the documentation all the example code
◼
►
all the things that you see on Stack
◼
►
Overflow suddenly don't work for you
◼
►
anymore thank you that you have to not
◼
►
only not only have you built your own
◼
►
approach like you were even if it's not
◼
►
like you're just going down the road
◼
►
it's like doing something custom like if
◼
►
you just have old code then suddenly you
◼
►
have this new thing that Apple has put
◼
►
out there pushing and that's where all
◼
►
their focus is going suddenly that's
◼
►
where all the documentation is written
◼
►
for and the you know the example code
◼
►
they publish will use that new thing and
◼
►
so there's not a lot of great examples
◼
►
and it becomes harder and harder and
◼
►
like the biggest example is probably
◼
►
Swift like I remember sort of you had
◼
►
there was this transition period where
◼
►
all of a sudden all the answers on Stack
◼
►
Overflow for you know questions I had
◼
►
about the new technologies we're all all
◼
►
the example code was just written in
◼
►
Swift or you know people like snippets
◼
►
and that can become really awkward and
◼
►
it's probably a good reason to try and
◼
►
adopt some of these things with some
◼
►
urgency just to not be sort of fall
◼
►
behind to a degree that you just can't
◼
►
work out what to do or perhaps moreover
◼
►
you're wasting time like I remember
◼
►
sitting there wasting time like trying
◼
►
to translate the swift code into
◼
►
objective-c and then trying to work out
◼
►
how to then take that concept and apply
◼
►
it into my own app but I have to do this
◼
►
like level of indirection whereas if it
◼
►
my app wasn't Swift like you like oh I
◼
►
see what they're doing there I can build
◼
►
it you know for myself now and that's
◼
►
something that I think it takes a lot of
◼
►
experience to realize that you're not
◼
►
just running into technical issues
◼
►
you're running into like educational and
◼
►
well oh yeah but you know that's just
◼
►
kind of par for the course and it has
◼
►
thing to move on and new things come in
◼
►
you know it's kind of like part of the
◼
►
cost of sticking with old stuff is that
◼
►
everyone else moves on it seems you know
◼
►
and that that isn't actually no it isn't
◼
►
everyone that's how it seems like when
◼
►
you're searching for help or
◼
►
documentation or or looking for where
◼
►
Apple's attention is going like once the
◼
►
new thing comes out all those people
◼
►
move on to it and if you are lagging
◼
►
behind or you string the old thing
◼
►
that's just again it's just part of the
◼
►
cost of doing business you know oh sure
◼
►
but it's it's a weird feeling when
◼
►
you're like it's some ways I love that I
◼
►
have some you know I've apps on the App
◼
►
Store that have been have existed for
◼
►
years and never see this is a it's I
◼
►
took a very classic issue in software
◼
►
engineering of what are you dealing with
◼
►
legacy code that you have things that
◼
►
work they should go back to and I mean
◼
►
it's a crazy feeling when you go back
◼
►
and look at code and run blame and get
◼
►
and you see you know this was code was
◼
►
written back in 2009 or 2010 what was I
◼
►
doing like why did I have this strange
◼
►
exception and so often you run into this
◼
►
situation where like you were coding
◼
►
around an iOS bug in iOS 5 that you no
◼
►
longer need to code around and at some
◼
►
point like you have this weird cycle
◼
►
where you're coding around to prop a bug
◼
►
that then gets resolved and then your
◼
►
code your fix starts to actually be the
◼
►
bug and caused the problem because
◼
►
you're doing stuff that isn't is sort of
◼
►
counter to what the modern approaches
◼
►
and that's probably why it's so hard to
◼
►
be a UI could engineer yeah no I
◼
►
definitely don't envy the you know and
◼
►
envy that team where they do this really
◼
►
cool amazing work but like the number of
◼
►
day having at work across all the
◼
►
different devices and all the different
◼
►
things and having an iOS because that
◼
►
another thing that's kind of crazy is
◼
►
the way they approach with binary
◼
►
compatibility and like you can still run
◼
►
an iOS 4 app on iOS 10 like it'll
◼
►
probably be a little bit broken and
◼
►
janky but like they do a lot of work to
◼
►
keep things forward which is perhaps
◼
►
another year like I was saying earlier
◼
►
but another reason why being like I keep
◼
►
telling myself to be less of a
◼
►
curmudgeon about the new stuff because
◼
►
I'm probably wasting a lot of
◼
►
that you know Apple is paying engineers
◼
►
to do this work and then I'm just like
◼
►
walking past them and saying nope nope
◼
►
I'll do it myself I'll take care of this
◼
►
myself where that's probably an
◼
►
inefficient use of my time yeah all
◼
►
right so let me give a few examples of
◼
►
some of the more recent things that I
◼
►
have that I've been working with in the
◼
►
last few weeks doing overcast 3.0 in the
◼
►
last few versions I've made extensive
◼
►
use of kvo key-value observing and this
◼
►
has been helped tremendously by the
◼
►
Facebook the FB kvo controller it is a
◼
►
fantastic open source component I highly
◼
►
recommend that anybody using kvo or
◼
►
curious about kbo do it with the FB kvo
◼
►
controller don't do worth of raw calls
◼
►
because they're full of bug potential
◼
►
and the Facebook one boys a lot of that
◼
►
is very nice to use generally this is
◼
►
you know this is in very short terms a
◼
►
way to have some code notified whenever
◼
►
a certain value of a different object
◼
►
changes so this is kind of and I think
◼
►
this is what reactive cocoa is all about
◼
►
mostly it's like basically and please
◼
►
forgive me if that's wrong but basically
◼
►
like kind of having having views and
◼
►
controls basically update themselves
◼
►
based on values that changed and also
◼
►
similar to what OS tended with bindings
◼
►
which have never never made its iOS but
◼
►
honestly having used them very briefly
◼
►
and they're kind of cool I know people I
◼
►
know there's potential issues but they
◼
►
can't be pretty cool where I've been
◼
►
moving basically is moving rather than
◼
►
having like a view controller that has a
◼
►
stock UI switch and having the view
◼
►
controller manage the state of that UI
◼
►
switch and be notified when the switch
◼
►
is toggled to go change the value to
◼
►
assign it the value when it's loaded or
◼
►
when the value changes moving all of
◼
►
that into a custom subclass of UI switch
◼
►
or whatever the control is and having
◼
►
the control manage itself and that takes
◼
►
tons of code out of the view controllers
◼
►
and makes way more reusable components
◼
►
way easier if you're in testing it's way
◼
►
easier to test these things also and it
◼
►
really eliminates tons of potential
◼
►
weirdness and bugs and edge cases like
◼
►
one of the screens that I just made
◼
►
uses a table view that has a couple of
◼
►
switches and buttons in it in the old
◼
►
way of me doing these things I'd either
◼
►
not monitor for underlying changes like
◼
►
if a change gets synced over that that
◼
►
would change one of those switches or
◼
►
I'd monitor from the viewcontroller and
◼
►
if any of those values change I just
◼
►
call table view reload ruler data and
◼
►
just reload the entire table and that
◼
►
sucks like if you can avoid doing that
◼
►
you should and I don't need to reload a
◼
►
whole table to change the value of one
◼
►
switch that there were like the
◼
►
underlying data to happen to change it
◼
►
during during that views presence on
◼
►
screen I can just subclass that switch
◼
►
and just have like rather than having
◼
►
like you know a whole bunch of playing
◼
►
UI switches in the table view the one
◼
►
that has the rotation setting that's now
◼
►
an OC rotation switch and now I can in
◼
►
my table view when I'm making the cell I
◼
►
can just say accessory view equals OC
◼
►
rotation switch and the switch itself in
◼
►
its code man it watches the value it
◼
►
adds itself as a target and has its own
◼
►
target implementation of like here's how
◼
►
I'm going to change this value now and
◼
►
you know and this is basically making
◼
►
these components self-contained and
◼
►
where this really shines not only
◼
►
cleaning up your view controllers and
◼
►
code reuse and testability and
◼
►
everything else where this really is
◼
►
awesome is another bad word that I I
◼
►
didn't use for a long time interface
◼
►
builder I recently started using
◼
►
interface builder to design some of my
◼
►
main screens as well as I started using
◼
►
IB designing and this is this is a thing
◼
►
where you can in a couple of methods and
◼
►
put a couple annotations on your file
◼
►
just look up IB design a ball you can
◼
►
basically make custom controls appear
◼
►
correctly interface builder so if you if
◼
►
you need to draw draw things custom on
◼
►
on a button or style in a certain way or
◼
►
whatever else you can do all that and
◼
►
have that show up interface builder
◼
►
rather than just having a big empty
◼
►
white view or like a none store
◼
►
something like that using that basically
◼
►
I'm trying to get as much as much code
◼
►
as possible out of view controllers
◼
►
because again it's that's kind of like a
◼
►
bad technical debt bug potential kind of
◼
►
written area so just try to make smaller
◼
►
view controllers and a big thing a big
◼
►
thing with that is using interface
◼
►
builder as much as possible and
◼
►
interface builder is not like a panacea
◼
►
but if you if you do my my approach of
◼
►
like having self-contained components
◼
►
that manage themselves and if you take
◼
►
advantage of things like I'd be
◼
►
desirable a lot of things become easier
◼
►
for instance portrait and landscape
◼
►
differences with Auto layout oh again
◼
►
I'm also using auto layout now interface
◼
►
that had really I know yeah that's like
◼
►
I thought I'd never do that but I one
◼
►
day I just kind of plaid to them like
◼
►
you know I mean I'm gonna learn how to
◼
►
do it and then I can decide whether I
◼
►
really need to use it or not and it
◼
►
turns out yeah it's not it's not easier
◼
►
intuitive but neither is anything else
◼
►
about interface builder and and once you
◼
►
figure out oh you have to like right
◼
►
drag from itself to itself like weird
◼
►
well these all the little weird things
◼
►
you have to do to make interface builder
◼
►
work correctly there most of us are
◼
►
totally undiscoverable once you figure
◼
►
those out Auto layout Internet face
◼
►
builder really isn't that bad it's not
◼
►
easy but it actually can be more
◼
►
productive in some case depending what
◼
►
you're doing it's what you know basic
◼
►
things like if you're gonna have a
◼
►
difference between a portrait and
◼
►
landscape layout it makes us so much
◼
►
easier to it in fact my one wish for it
◼
►
is that I wish that the size classes
◼
►
were more granular more like CSS like I
◼
►
would love to be able to say if the you
◼
►
know if the width of this view is less
◼
►
than 300 points then change this
◼
►
condition rather than just being like if
◼
►
this is horizontal or vertical compact
◼
►
you know the the size classes that we
◼
►
have now are very coarse and I would
◼
►
like things to be more powerful more
◼
►
like what CSS does with like media
◼
►
queries and stuff but other than that I
◼
►
I have had fantastic luck in in my
◼
►
recent redesign and and cleanup of this
◼
►
code basically using stuff that's new to
◼
►
me that is not new to anybody else in
◼
►
iOS development I'm still not using
◼
►
storyboards but not going crazy no no I
◼
►
I mean that's that would be crazy but I
◼
►
have found it really like these things
◼
►
make so many things easier like like the
◼
►
like as I mentioned where they're
◼
►
self-contained buttons and things that
◼
►
makes it easier implement custom themes
◼
►
because I have all the controls that
◼
►
have a theme Abul property I have them
◼
►
monitor for appearance changes in my
◼
►
appearance manager class and then they
◼
►
can just redraw themselves makes it
◼
►
easier to support dynamic text that way
◼
►
also because I had a little trick in my
◼
►
app where my my appearance did change
◼
►
notification I just mapped it to the
◼
►
text category size did change
◼
►
notification so basically all my
◼
►
handling like if you if if you switch
◼
►
into into or out of dark mode and
◼
►
overcast or if you go and change system
◼
►
so all my labels can redraw themselves
◼
►
everything can resize itself I can do
◼
►
this without this kind of technique and
◼
►
without any ologies I for many years I
◼
►
have but it just makes it so much easier
◼
►
and more reliable to do it this way and
◼
►
it makes the code a lot more manageable
◼
►
and and it does make it easier to take
◼
►
advantage of new technologies that Apple
◼
►
introduced it's going forward and so
◼
►
that's that's I think where most of the
◼
►
value is here so you know I guess maybe
◼
►
I'll uh probably try Swift pretty soon
◼
►
but I don't maybe I don't go crazy there
◼
►
either we'll see not yet just you know
◼
►
one step at a time slowly slowly walk
◼
►
down this road yeah exactly
◼
►
all right well we're out of time this
◼
►
week thank you very much everybody for
◼
►
listening and we will talk to you next