Uploaded October 2012 | Updated September 2026, 1 week ago
Subscribe to our channel here for notifications on new video trainings. For more videos on technology, visit our website at http://www.techytube.com.
By pavel@techytube, for more from this author visit:
techytube.com/author/pavel
Xcode is a very powerful IDE created by Apple, where we spend most of our time when developing iOS apps (and also Mac OS applications, for Mac developers).
Every-time we are creating a new Project it gives us a couple of templates to choose from as a starting point.
There are different templates that we can use in different type of applications:
1) Master-Detail Application - when we want to create apps that have Master views, and when tapping on a raw inside it, it takes us to the Detail view, which contains more information about the selected item.
Real examples may be the standard Notes and Contacts apps.
2) OpenGL Game - this is a good starting for an OpenGL app, most offen a game.
3) Page-Based Application - a book like flipping control that takes us from one view to another.
4) Single View Application - this is very commonly used, and it only creates a UIViewController subclass, and a .xib file, or a scene in case of Storyboards (do not worry if you don't know what those mean at this moment, they are basically the User Interface of our app).
5) Tabbed Application - an app that contains more view controllers and an tab like navigation interface. A good example may be Friends, or the standard Clock app.
6) Utility Application - a simple code that has a main view and a flip-side view (usually for a menu).
7) Empty Application - the simplest project that has only the Xcode Project configurations inside it and nothing else.
Subscribe to our channel here for notifications on new video trainings. For more videos on technology, visit our website at http://www.techytube.com.
By pavel@techytube, for more from this author visit:
techytube.com/author/pavel
Xcode is a very powerful IDE created by Apple, where we spend most of our time when developing iOS apps (and also Mac OS applications, for Mac developers).
Every-time we are creating a new Project it gives us a couple of templates to choose from as a starting point.
There are different templates that we can use in different type of applications:
1) Master-Detail Application - when we want to create apps that have Master views, and when tapping on a raw inside it, it takes us to the Detail view, which contains more information about the selected item.
Real examples may be the standard Notes and Contacts apps.
2) OpenGL Game - this is a good starting for an OpenGL app, most offen a game.
3) Page-Based Application - a book like flipping control that takes us from one view to another.
4) Single View Application - this is very commonly used, and it only creates a UIViewController subclass, and a .xib file, or a scene in case of Storyboards (do not worry if you don't know what those mean at this moment, they are basically the User Interface of our app).
5) Tabbed Application - an app that contains more view controllers and an tab like navigation interface. A good example may be Friends, or the standard Clock app.
6) Utility Application - a simple code that has a main view and a flip-side view (usually for a menu).
7) Empty Application - the simplest project that has only the Xcode Project configurations inside it and nothing else.

![Working with paths and urls in Objective-C
Subscribe to our channel here for notifications on new video trainings. For more videos on technology, visit our website at http://www.techytube.com.
By pavel@techytube, for more from this author visit:
http://www.techytube.com/author/pavel
When working with files in Objective-C, we can specify the paths to them as follows:
NSString *path = @/Users/pavel/file.txt;
However, the recommended way (by Apple engineers) to specify that is by using URL-s (Uniform Resource Locator).
The iOS SDK class that provides us urls manipulation is named NSURL, and it has a lot of class convenience methods that make developers lives easier.
To create a NSURL object, we use the syntax:
NSURL *url = [NSURL URLWithString:@file:///Users/pavel/file.txt];
Note that the way we specify the string is different from in path cases.
It should always have the file schema in front of it, than a colon, and 3 slashes.
If we want to create a NSURL object, providing a string as in path cases, we can use a NSURL method which allows us to do that:
NSURL *newUrl = [NSURL fileURLWithPath:@/Users/pavel/Public/file.txt];
To move files from one location to another using urls instead of paths, we should use:
[[NSFileManager defaultManager] moveItemAtURL:url toURL:newUrl error:nil]; Working with paths and urls in Objective-C](https://i.ytimg.com/vi/xix_7Nqa7qM/mqdefault.jpg)


![How to use the UIImageView class to animate a series of images
Subscribe to our channel here for notifications on new video trainings. For more videos on technology, visit our website at http://www.techytube.com.
By pavel@techytube, for more from this author visit:
http://www.techytube.com/author/pavel
An image view object provides a view-based container for displaying either a single image or for animating a series of images. For animating the images, the UIImageView class provides controls to set the duration and frequency of the animation. You can also start and stop the animation freely.
You specify the animation images by setting the animationImages property of the UIImageView object:
imageView.animationImages = [NSArray arrayWithObjects:
[UIImage imageNamed:@blue],
[UIImage imageNamed:@green],
[UIImage imageNamed:@orange],
nil];
We specify the duration of the animation by setting the animationDuration property:
imageView.animationDuration = 3.0f;
We can start or stop animating the images by sending startAnimating or stopAnimating messages to the image view object:
[imageView startAnimating];
or
[imageView stopAnimating];
All images associated with a UIImageView object should use the same scale. If your application uses images with different scales, they may render incorrectly.
For more details, please visit Apples Online Documentation at:
http://developer.apple.com/library/ios/#documentation/uikit/reference/UIImageView_Class/Reference/Reference.html How to use the UIImageView class to animate a series of images](https://i.ytimg.com/vi/yEbid5QUemY/mqdefault.jpg)

![How to create view controllers programmatically in iOS
Subscribe to our channel here for notifications on new video trainings. For more videos on technology, visit our website at http://www.techytube.com.
By pavel@techytube, for more from this author visit:
http://www.techytube.com/author/pavel
The UINavigationController class implements a specialized view controller that manages the navigation of hierarchical content. This class is not intended for subclassing. Instead, you use instances of it as-is in situations where you want your applications user interface to reflect the hierarchical nature of your content. This navigation interface makes it possible to present your data efficiently and also makes it easier for the user to navigate that content.
To create a navigation controller programmatically, you have to write the following code:
UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:self.viewController];
Usually that is done in the AppDelegate.m file, but it can be done in any file you need.
If you do that in the AppDelegate.m file than you should replace the line:
self.window.rootViewController = self.viewController;
with the following line:
self.window.rootViewController = navController;
and it is perfectly ok because UINavigationController is a subclass of UIViewController.
If you run the program, you may notice a blue navigation bar appears on the top. You can customise that if you want, or you can hide it using any of the 2 lines below:
navController.navigationBarHidden = YES;
navController.navigationBar.hidden = YES;
To set a title in the NavBar, you should write in the viewDidLoad method of the ViewController class that is currently displayed by the Navigator object, any of the 2 lines below:
self.navigationItem.title = @Title;
self.title = @Title; How to create view controllers programmatically in iOS](https://i.ytimg.com/vi/zDLjdxmdwxs/mqdefault.jpg)


