Archive for Tutorials

Simple Sqlite Database Interaction Using FMDB

November 4th, 2011 Posted by: - posted under:Tutorials - 16 Comments

Introduction
In the age where Core Data is king, the database that started it all is often overlooked. I’m talking of course about sqlite. As you may or may not know, prior to core data, sqlite was the preferred method of storing relational data on iOS devices.
Although, most developers don’t interact with sqlite directly, they still use it under the hood as the primary data store for core data. This is great and all, but there are often times when raw …

    READ MORE

    Back To Basics – An Introduction To View Controllers

    October 11th, 2011 Posted by: - posted under:Tutorials - 13 Comments

    Introduction
    In today’s post, we are going to be discussing view controllers. Let’s start by talking about what a view controller is and it’s role in your iOS projects.
    What is a View Controller?
    View Controllers are at the core of every application. They act as sort of the glue between your models and your views. View controllers are both responsible for fetching/initializing your models as well as loading up your views to display the information within them.
    Basic View Controllers
    Every …

      READ MORE

      Dynamically Controlling Your Application From The Web

      September 30th, 2011 Posted by: - posted under:Tutorials - 9 Comments

      Often times you find yourself in a situation where you might want to control your application remotely. You may want to enable/disable features at a certain time, push messages to all of your users, or do some cross promotion whenever you launch a new application. All of this can easily be done with a little JSON and some simple web interface coding.

       
      In this tutorial, I will show you how to use ASIHTTPRequest along with JSONKIT to fetch, parse, …

        READ MORE

        Timing Out An Application Due To Inactivity

        September 19th, 2011 Posted by: - posted under:Tutorials - 6 Comments

        In the recent months, I have had a few separate applications that required a “timeout”. What I mean by this is, the application should log the user out if they haven’t touched the screen in X number of minutes. There are quite a few uses for this, but the best use is when you have an application that contains sensitive data in a shared environment.
        For example, say your company uses iPads to collect feedback from your …

          READ MORE

          Grand Central Dispatch And Writing Methods That Accept Blocks As Arguments

          August 31st, 2011 Posted by: - posted under:Tutorials - 4 Comments

          Have you ever looked at the enumerateObjectsUsingBlock method of NSArray and wondered how you might use that design pattern in your own application. In this tutorial, I will be showing you how to do just this. We will be writing methods that accept blocks as arguments as well as learning how to declare block ivars and properties.
          This tutorial assumes that you have at least a basic understanding of using blocks and Grand Central Dispatch (GCD). If not, …

            READ MORE

            Disable the iPhone’s Front Camera

            August 23rd, 2011 Posted by: - posted under:Tutorials - 4 Comments

            The iPhone 4’s front camera is limited to 640×480 resolution. Although handy for video conferencing, for some apps that’s to small to yield a usable photo. Unfortunately the UIImagePickerController class does not have an option to restrict the user from using the front camera. Although you can check the size of the photo after the user is finished, it’s not great user experience to reject it after they go through the entire process of taking a photo.
            One option is to …

              READ MORE

              Back To Basics: Hello iPhone

              August 17th, 2011 Posted by: - posted under:Tutorials - 22 Comments

              Today I’m going to show you how to make a simple “Hello World” project on the iPhone. There are quite a few ways that this can be accomplished, however I am going to show you the way that I feel will be the most beneficial.
              While I know many of iCodeBlog’s readers are veteran developers, this tutorial (and many in this series) are going to be geared towards the more novice developer. This group is often overlooked when it comes to …

                READ MORE

                Adding block callbacks to the Facebook iOS SDK

                July 19th, 2011 Posted by: - posted under:Tutorials - 7 Comments

                If you are like me and love using blocks over delegates, then these code snippets will come in handy. After learning about blocks I have come to love to use them, especially using them for callbacks rather than using the old protocol/delegate methodology. These code snippets will allow you to use blocks as callbacks over delegates.
                In a previous post Facebook SDK – Posting to User News Feed I showed how to post various types of status’s to the …

                  READ MORE

                  Back To Basics – Getting Set Up For iOS Development

                  July 18th, 2011 Posted by: - posted under:Tutorials - 25 Comments

                  For this tutorial, we are going to discuss the basics of getting set up for developing on the iOS platform. While there are many 3rd party tools that allow you to develop a number of ways, I am only going to discuss the officially supported ones from Apple. That being said, let’s get started.
                  The Hardware

                  The first thing you are going to need is an Intel Based Apple Computer running OSX 10.6.6 or better. Hackintosh computers have …

                    READ MORE

                    iPhone Development – Back To Basics

                    July 12th, 2011 Posted by: - posted under:Articles » Tutorials - 18 Comments

                    Wow, can you believe that it has been almost 3 years since I started iCodeblog!? It seems like just yesterday, That I wrote my very first tutorial in July of 2008. Now, iCodeBlog has multiple authors, hundreds of tutorials, and over 5,000 readers per day!
                    As you know, a few things (to say the least) have changed since we first launched iCodeBlog in 2008 with the way we develop for the iOS platform. With that being said, …

                      READ MORE