This code will make a doughnut as shown in following screenshot. (Please ignore the check texture in the background of screenshot, that will not be generated with above code, Only orange doughnut will be generated). You can use your own created gradient by changing the values in gradient.

If you are writing an application where you want to know what language is set in user's setting, then you can use following code snippet. This will give you an idea how to check for any other language, this code only checks for German and English.

In order to know about rotation matrix, read thisLINK
It tells you about matrix used for rotation around x, y and z axis. For rotation around X as well Y (mixed rotation) we just multiply rotation matrix of X and Y axis.

There are 3 sliders with which you can rotate the cube along X, Y and Z axis.

Ok. In previous we post we talked about how to get the localized string values on your .m files.LINK.

In this post, we will talk about how to localize the strings present in the nib file.

One way would be to make the connections of all the elements in the view and then set their title text with NSLocalizedString(@"key", @""); .Sometimes this is the only way to do it when the text in the nib files are dynamic.

Next way(For static strings in the nib files), recommended by Apple is following. We have created a nib file for us. And it looks like following.

Because it is in english, we will put in en.lproj directory.

Now we open Terminal to write some commands to extract the english strings from our nib file into a new string file. By using cd I am inside the Localization folder. Following is my dir structure seen on Finder window.

(Note: the command above will generate the HomeController.strings file in en.lproj folder, you will have to add it in your Xcode yourself manually ) HomeController.strings string file which looks like following:

We create the copy of HomeController.strings in de.lproj folder and replace the english strings with german strings. Manually add it in Xcode. HomeController.strings string file which looks like following:

Now we will create the german version of the nib file by merging the german string file (I mean : de.lproj> HomeController.strings) with original nib file by using following command

Live Feed

My Tweets

Goal to Open Source

I believe in open knowledge, hence I want to make this technology open source whatever I can on my blog. You can ask me to write about any particular mobile topic if you want. You can follow me on Twitter as well.