• Swift: Core Motion

    Many apple mobile devices have motion APIs. There are many APIs and they all use the CMMotionManager class. Usually you only have 1 instance of this class in a high level area like the AppDelegate. You can get more information about Core Motion here.

    Friday, April 10, 2015

    ios motion accelerometer gyro

  • C++11: Casting

    Lets say you have a Animal class and a Dog class. You make a pointer to Animal animal_ptr and you make it point to a Dog object. Now you make a pointer to Dog and you make it point to animal_ptr. The compiler will complain. What should you do? You should cast it because you know that animal_ptr already points to a Dog object. You can find out more about casting here.

    Friday, April 10, 2015

    cpp11 cast static_cast dynamic_cast reinterpret_cast

  • C++11 to C# Callback

    Sometimes you need/have to use C++ together with C#. Normally you would create a class in C++ and export it as a dll which you would use in C#. Other times you would want to execute some C# code when something happens in C++. This post will go step by step showing you how to pass in a C# callback to C++ to be executed. You can get more information about how to accomplish this task here.

    Thursday, April 9, 2015

    csharp cpp11 callback export

  • C++11: Templates

    In C++, generics are done using templates. Templates generate the required code at compile time instead of at runtime. This improves performance significantly. You can find more information about templates here.

    Tuesday, April 7, 2015

    cpp11 templates

  • C++11: Pointers

    In C++, pointers are extremely important. This is only a brief overview of pointers. You can find more information about pointers here. To read about the differences between a shared and unique pointer, refer to this post.

    Tuesday, April 7, 2015

    cpp11 pointers

  • Swift: UIView Animation

    Animations and transitions are extremely important in iOS development. That’s why you have to know them (I feel like I say that a lot…)! You can find more information about animations here.

    Sunday, March 29, 2015

    ios animation uiview

  • Swift: UIView Animation 2

    This is part 2 of the animations post. In this post, we will look at how to add special animations to views. Like when you slide from the bottom of an iPhone and the menu appears with a small bounce.

    Sunday, March 29, 2015

    ios animation uiview

  • Swift: UITableView

    TableViews are used everywhere in iOS dev which is why you have to know it. You can find more information about UITableViews here.

    Saturday, March 28, 2015

    ios table

  • Swift: NSTimer

    When you want to run something every x amount of time, you use an NSTimer. It is like the setInterval or setTimeout function from Javascript. You can find more information on NSTimers here.

    Saturday, March 28, 2015

    ios timer setinterval

  • Swift: Multithreading

    Multithreading is a big part of Programming and you should know it well. You can find more information about multithreading here.

    Wednesday, March 25, 2015

    ios thread parallel background concurrency

  • Swift: Closures

    Closures are awesome. You can do some powerful things with them, but they are dangerous sometimes. You can find more information about closures here.

    Wednesday, March 25, 2015

    ios closure anonymous

  • Swift: ViewController Lifecycle

    The lifecycle for a ViewController is as follows.

    Tuesday, March 24, 2015

    ios viewcontroller

  • Swift: UIView Bounds vs Frame vs Center

    When developing for iOS, a lot of people confuse a UIView’s bounds, frame and center. This post will illustrate their difference. The images are taken from Stanford’s cs193p class.

    Sunday, March 22, 2015

    ios bounds center frame ui

  • Swift: Making a Protocol

    In the MVC design pattern, the model does not have access to the controller. But it has to let the controller know somehow that its data has changed. To do that it uses a protocol. A protocol is basically an interface in Java. Here’s how you would use it in swift.

    Sunday, March 22, 2015

    ios delegate protocol

  • Swift: Gestures

    Gestures are a big part of mobile development. This post is all about how to add gestures in iOS dev. You can find more information about gestures on Ray Wenderlich’s site or on ioscreator.

    Sunday, March 22, 2015

    ios gestures swipe pinch

Random Posts