{%Pragmatic Coding%} Tips and tricks for software developers.

22Jan/121

NSLog – from beginning to advanced.

Hello friends!
First of all thanks to my friends were asking me about NSLog features, so, I decided to write about it.
So, let's get start with introduction where I will describe what is NSLog and basic usage of it.
Read the full article...

21Jan/122

Blocks in Objective-C: Part 2. Getting Advanced

BlocksContinuing our serie about blocks in objective-c.

In this part we'll review advanced usage of blocks with arrays, enumerators, recursion and stop to end processing.
Read the full article...

20Jan/121

Blocks in Objective-C: Part 1. Introduction

When I have started write my blog my friend asked me if I could write something about blocks in Objective-C. So, time passed, and finally I get closer with blocks, made a review of some articles and now will write a scope af articles about using blocks in objective-c.

In a first look block are looks strange and I'm sure you will ask me why do we need to use blocks?
Read the full article...

12Jan/120

Automatic Reference Counting (ARC) in iOS 5 – Part 1

This is part 1 on Automatic Reference Counting post. Enjoy!

Few weeks ago I have updated my environment to iOS 5 SDK and xCode 4.2 and was really surprised seeing bunch of new features added to 5th SDK. And today we will talk about one of these features.

Automatic Reference Counting (ARC) is a new feature introduced in iOS 5 SDK for programmers from having to handle memory management by making memory management the job of the compiler.  Instead of you having to remember when to retain or release an object, ARC evaluates the lifetime requirements of your objects and automatically inserts the appropriate method calls at compile time.

Ok, that's cool new stuff and it looks like makes life  easier with automatic reference counting. Great but not so fast, certainly here is a difference between standard [release] [retain] [autorelease] and new way of coding with ARC.
Read the full article...

Tagged as: ARC, iOS Continue reading
11Jan/122

How to make a screenshot of your iPad and iPhone screen

The simple way how to take a screenshot using your iPad and iPhone, and how to transfer it to your PC or Mac.
Read the full article...

21Dec/110

Simple iTunes File Sharing with iOS App

Recently I had to implement File sharing with the second version of my iPad application and it become easier than I thought.

I found out great opportunity that gives  iOS 4 +  with new functionality allowing you to enable file sharing between your apps and iTunes.  There are just a few steps that need to be done to get this functionality working just right.

So, as an example I had to made file sharing of CSV file where my application collect specific information about customers.

STEP 1:
First of all you need to create manually CSV file you want to share in your Resources folder as shown below.

Read the full article...

20Dec/110

Set Locale with Date Formatter

In one of my projects I was confused if it is possible or not to sep up Locale for displaying a date time.

So, by default, the NSDateFormatter uses the locale set on the device, and there is no code specific locale changes are required if you want your app to display in the current locale.

But, what if you need to display a date in a locale other than the current setting on the device. Read the full article...

20Dec/113

Capturing UIScrollView off screen content

Hello friends! This is my first post and it will be about my experience of making screenshot of UIScrollView.

So I have searched a lot but found not really a lot of suggestions of how to make it. So I decided to try the combination of  what I have found. And finally it works! Read the full article...