Delete button title in table view iOS

To change a delete button title use this:

UIView animation pattern

Animation pattern using blocks:

How to create an animated Intro View in iOS

I will explain, how to create an animation, when you Default image comes to front with dissolving.

To create an animated Intro View in iOS App, which has a TabBarController you may do the following:

    1. Create an Intro View Controller, which has one UIImageView with your Default.png.
    2. Add the following to your application didFinishLaunchingWithOptions method
    3. Add the following method to your IntroViewController:

    Explanation:
    After app loads, Intro View Controller is diplayed. Then, when it’s view appears, it’s UIImageView’s frame is trippled in size and it’s origin is moved to top left. Also the transparency is changed to 100%. After animation finishes, your tab bar controller is displayed.

Bash profile file for OS X

Opening file:

File contents:

Activation:

Usage:

How to remove Three20 from the project

1. Open terminal
2. Write something like this according to your project:

3. You will see all files, that contain three20 string.
4. The main thing to make your project compile and start working is to delete three20 entries from project.xcworkspace file, that can be found in finder by right clicking your project file and selecting show package contents. Open this file in any editor(I use Fraise) and using find delete all entries. It is not hard to do this, I had about 3-4 entries there only.
5. Other user interface state files also may contain three20 entries, but they are not important.
6. Also you should delete anything else concerning three20 (files, folders, header search paths, etc.). It’s more simple.

How to sort an array of custom objects by date in Objective C

This is an example of sorting an array of custom objects by date in Objective C in descending order. Sorting by date is not different from sorting by NSInteger.

There are two ways to do this. First is to use NSSortDescriptor:

The second is to use NSComparisonResult:

To sort in ascending order change this line:

This post helped me a lot.

Git remove all .DS_Store files recursively

Sometimes Git doesn’t work properly with .DS_Store files in each of the folders.
This is how to git remove all .DS_Store files recursively:

Here dot after “find” means that it will search in all folders inside current folder.
“-exec” runs “git rm” for each found file.
Plus means the end of the “-exec” statement.

Add a button like UIBarButtonItem to the center of Navigation Bar

This is how you programmatically add a button like UIBarButtonItem to the center of Navigation Bar: