サクサク読めて、アプリ限定の機能も多数!
トップへ戻る
アメリカ大統領選
www.natashatherobot.com
Posted on March 22nd, 2017 One thing I’ve noticed recently in my code-base is that I tend to default to guard vs if. In fact, whenever I write an if statement, I facepalm myself and change it to a guard without thinking much. But that’s become a problem. There is in fact a difference between guard and if and thought does need to be put into which one to use. The difference is a bit subtle, but it
Posted on May 13th, 2016 Join me for a Swift Community Celebration 🎉 in New York City on September 1st and 2nd. Use code NATASHATHEROBOT to get $100 off! I recently gave a talk on Practical Protocol-Oriented-Programming(POP💥) in Swift. The video is still being processed. Meanwhile, here is the written-up version of the POP View part of the talk for reference (for me and anyone else!). The Setup
Posted on March 27th, 2016 One of my favorite talks at @tryswiftconf (ok, every talk was my favorite!) was when @helenvholmes talked about how to get designers into code. One of the big things to do is very obvious – use Storyboards! Immediately, this comment was a bit controversial among developers. Honestly, I don’t see the whole controversy. Does Interface Builder have a few issues? Sure! But i
Posted on March 8th, 2016 I cannot think of a bigger personal accomplishment than making try! Swift – my very first conference… in Japan… in two languages… with 33 speakers… with 500+ attendees from all over the world – a reality! Sure, there were AMAZING technical talks and (almost) everything went as planned, but the main reason I’m so proud of this event is the fact that we were able to break l
Posted on February 13th, 2016 Over the past few days, I’ve been hectically working on the try! Swift Conference app (now only 2.5 more weeks to show time 😱)! One of my stretch goal MVP features was implementing 3D Touch to Peek & Pop speaker and presentation information in the app. Luckily, @allonsykraken made it so easy with this Peek & Pop Spirit Guide, that it took only minutes to implement on
Posted on June 30th, 2015 Ok, hope you can tell I was having way too much fun with this title 🙂 Anyway, now back to regularly scheduled programming… Over the last few days, I’ve been watching the Advanced Debugging and the Address Sanitizer Session over breakfast. There is one super cool debugging trick that I have to write down so I remember to actually use it. The Crash The funny thing is that
Posted on December 17th, 2015 Back in August, I watched the phenomenal Swift in Practice WWDC15 Session. I wrote about the first part of the video that impressed me – A Beautiful Solution to Non-Optional UIImage Named in Swift – and I’m finally getting around to writing about the second and even more exciting part of that video (after all, holidays are best for catching up on blogging!). This time
Posted on November 12th, 2015 I’ve been incorporating Protocol-Oriented Programming more and more in my Swift code and I LOVE it!!! Thanks again to @mhollemans for the article on Mixins and Traits in Swift 2.0 – that really helped me understand how to use protocols in a very powerful and beautiful way. However, I’ve found that in practice, my objects sometimes conform to too many protocols, so the
Posted on July 29th, 2015 This morning I saw a beautiful tweet from @jesse_squires: #Swift tip: Use didSet on your IBOutlets to configure views instead of cramming code into viewDidLoad. Much cleaner. Still called only once. — Jesse Squires (@jesse_squires) July 29, 2015 Settings colors, fonts, and accessibility for UI elements in apps is always in pain. Ideally this would happen in the storyboard
Posted on August 17th, 2015 UPDATE: Read this instead for the most up-to-date implementation. Ever since the mind-blowing Protocol-Oriented Programming in Swift WWDC Session, I’ve been thinking a lot about using protocols. But in reality, I haven’t really been using them as much. I’m still digesting what protocol-oriented programming means, and where in my code I should be using it instead of my o
Posted on July 26th, 2015 One of my favorite patterns in iOS programming with Swift is to create multiple extensions throughout my files to keep related methods together. For example, every time my ViewController conforms to a protocol, I keep the protocol methods together in an extension. Same goes for multiple private styling methods or private cell configuration methods in a table view, etc. Th
Posted on June 9th, 2015 One of the biggest challenges to Unit Testing in Swift was the initial setup. Before Swift 2, you either had to make everything public or remember to add all your files to the testing target (more on this in my blog post on testing in Swift here). But as of yesterday, this annoying testing issue has been elegantly solved! All you need to do is: 1. Create Your Internal Clas
Posted on November 14th, 2014 When dealing with custom colors in my apps, I always just make a UIColor Category (aka Extension in Swift), because I’ve found that to be a lot easier than having to punch in the color values in Interface Builder for everything. However, recently I learned that there is a very easy way to make a custom Color Palette that can be used in Interface Builder and shared acr
Posted on November 29th, 2014 Notifications on Apple Watch facilitate quick, lightweight interaction in two parts: the Short Look and the Long Look. A Short Look appears when a local or remote notification needs to be presented to the user. A Short Look provides a discreet, minimal amount of information—preserving a degree of privacy. If the wearer lowers his or her wrist, the Short Look disappear
Posted on September 15th, 2014 Have you noticed how nicely the mobile Safari navigation bar condenses on scroll, and how the tab bar disappears? In iOS8, Apple has made this type of interaction (and more!) very easily available to us all – well, almost… While Apple demoed the condensing navigation bar at WWDC, they have since changed it to hiding the navigation instead, and the tab bar is not incl
Posted on September 14th, 2014 UPDATE: Check out the great discussion on Twitter here with @cocoaphony and @Hay about where you really should be adding and removing notification observers! So viewDidUnload has been deprecated as of iOS 6.0, and now dealloc() can no longer be used in Swift-based ViewControllers: This posed a challenge to me this morning as I was working with NSNotifications in my a
Posted on November 18th, 2014 I can’t get enough of WatchKit. Sooooo much to learn! After staring with a simple Hello World app, I’ve moved on to building a Table-based WatchKit example: Here is how to make a Table with WatchKit: Setup your Project Walk through the steps I’ve outlined in my initial WatchKit post – How To Create A “Hello World” WatchKit App. Make sure the app is up and running! In
Posted on June 11th, 2014 Ok, I’ll admit. I’ve been seriously struggling with AutoLayout ever since it’s been introduced. I understand the concept, and I LOVE the idea of it, but when I actually do it, it almost never behaves as it does in my head. So when I had a chance to go talk to an actual Apple Engineer about AutoLayout last week at WWDC, I made sure to go. I thought of my most painful exper
Posted on September 14th, 2014 I’ve recently started using the Model-View-ViewModel pattern a lot more to structure my iOS application code. While MVVM is not necessary in all cases, I’ve found it to be especially useful when writing iOS applications in Swift aka working with Optionals. I’ll use my demo SeinfeldQuotes app as an illustration of this. The App has a screen for displaying all Seinfeld
Posted on August 16th, 2014 One of the most important skills every programmer needs to have is debugging! Ever since I’ve been working with Swift, I’ve been definitely off in my coding because Swift is different to debug than my usual Objective-C debugging flow. So last week, I finally got around to watching the Advanced Swift Debugging in LLDB WWDC14 video. I really wish I watched it a lot earlie
Posted on September 7th, 2013 In my current project, I’ve implemented a Sign in with Github button using the Omniauth Github gem, which creates or finds the user and creates a user session. My sessions controller is currently very basic: # sessions_controller.rb class SessionsController < ApplicationController def create auth = request.env["omniauth.auth"] user = User.find_by_provider_and_uid(auth
このページを最初にブックマークしてみませんか?
『www.natashatherobot.com』の新着エントリーを見る
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く