• C# to Objective-C - Part 8 : Memory Management

    Probably one of the things that worried me the most about moving from C# to Objective-C was having to manually manage memory for myself. For years I was spoiled by .NET's automatic Garbage Collector. Now, not only would i be responsible for managing memory directly, but it'd also be on a device that had much less memory than a PC. 

    Have you had that same thought? Well, today I'm going to show you that managing…

    • Fri, Nov 30 2012
  • C# to Objective-C - Part 7 : Namespaces

    In C#, namespaces essentially serve 2 specific purposes: 

    1. Avoid naming collisions
    2. Inform a class of objects that are available. 

    Lets take a look at the latter first: 

    Using vs Import

    C#

    using System; 
    using System.Text;
    using MyCompany.CustomNamespace;

    Objective-C

    #import <UIKit/UIKit.h>
    #import <Foundation/Foundation.h>
    #import "CustomClass.h"

    As you can see, Objective-C does…

    • Wed, Nov 28 2012
  • C# to Objective-C - Part 6 : Reflection

    In today’s post I’m going to show you some basic reflection in Objective-C. To start off, lets take a look at probably the most common use case for reflection:

    Finding the type of an object

    C#:
    Type t = typeof(MyClass);

    Objective-C:
    Class c = [MyClass class];

    As you can see, in Objective-C we use the keyword “Class” instead of Type. Also we’re accessing a static method off of the class as opposed…

    • Tue, Nov 27 2012
  • C# to Objective-C - Part 5 : Enums

    Today’s post is actually going to be a really short one. There isn’t too much to really show, however its something that I had to look up a few times when I started working with Objective-C, so I figured its a good topic to cover anyways.

    C#:
    public enum Orientation
    {
       Vertical = 0,
       Horizontal
    }

    Objective-C:
    typedef enum
    {
       OrientationVertical = 0,
       OrientationHorizontal
    }Orientation;

    As in C#, it…

    • Mon, Nov 26 2012
  • C# to Objective-C - Part 4 : Interfaces

    Interfaces do exist in Objective-C, they just aren’t called interfaces. In fact, if you read my last post on Classes, you probably noticed that in the header file a class was defined as:

    @interface MyClass : NSObject

    @end

    Hmm… if I was coming directly from C# and knew nothing about Obj-C, i’d assume thats the same as .Net interface.  So whats going on above? And whats the equivalent of a C# interface…

    • Fri, Nov 23 2012
  • C# to Objective-C - Part 3 : Classes

    C# to Obj-C: Part 3 – Classes

    So far we've taken a look at some basic objects: Strings and Arrays. I think its about time we take the next step and dive into the creation of our own objects! So today I'm going to go over creating custom classes, properties, and methods.  

    The first thing to note, is that when you create a new class in objective-c you have 2 files, YourClass.h and YourClass.m. The “.h” file…

    • Wed, Nov 21 2012
  • C# to Objective-C - Part 2 : Arrays

    Today we'll continue our exploration into objective-c by looking at another common data type that you'll use heavily but has a slightly different syntax than C#: Arrays. 

    Before we dive right it in its worth noting that the goal of these posts is to be a reference/tutorial tool that will help a developer familiar with programming in C#, get up and running in objective-c in very little time. Enjoy!

    Arrays

    When…

    • Tue, Nov 20 2012
  • C# to Objective-C - Part 1 : Strings

    My background was originally C# where i worked on a variety of platforms such as ASP.Net, Silverlight, WPF, etc..  So after spending 6+ years working mainly in C#, I was both excited and hesitant to take a look at Objective-C. The first few months i spent a lot of time switching back and forth between Google and XCode(the IDE for iOS), as i familiarized myself with the syntax and API's of this "foreign" language. And although…

    • Mon, Nov 19 2012
  • Creating a Netflix style iOS Grid

    If you've ever used the iOS Netflix app, you've seen their opening screen. It's a list of sections and each section has a horizontal scrolling list of movies and tv shows. In my opinion this is a really neat UI, so today i'm going to ...
    • Tue, Nov 13 2012
  • Creating a Bookshelf for your iOS Application

    As this is my first post, before I begin, let me introduce myself. My name is Steve Zaharuk (SteveZ) and I've been working for Infragistics since 2004. I've worked on a lot of different platforms since I first started here including ASP.Net, Silverlight, WPF and now iOS, where I'm the Product Architect. 

    You can follow me on twitter at: @codebystevez

    In this blog I plan on showing your the true power of …

    • Fri, Nov 9 2012