Get to the point – iPhone Development: Tab Bar Application
Get to the point, iPhone development tutorials for those programmers who want concise step by step tutorials, but do not have the time to watch a 30 min video tutorial.
Get to the point – iPhone Development: Tab Bar Application (Adding new views)
1- Open Xcode and create a new “Tab Bar Application” (see Figure 1). Name it tabbartest (see Figure 2).
2- Xcode will create the necessary files for a basic Tab Bar Application (see Figure 3).
3- By double clicking the MainWindow.xib file Interface Builder will show up (see Figure 4). If the Inspector and Library windows don’t appear, open them (Tools->Library, Tools->Inspector).
4- Go back to Xcode and create a new file (File->New File). From the User Interface menu list select “View XIB” (see Figure 5). Name this view as ThirdView.xib (see Figure 6).
5- From Xcode double click the ThirdView.xib file. Interface Builder will show up again (see Figure 7).
6- Click on the File’s Owner icon. Go to the Inspector window and click on the “View Identity” icon. From the Class list select FirstViewController (see Figure 8).
7- Click on the “View Connection” menu option. Click on the view outlet, then drag & release it on the view canvas (see Figure 9). If you do this correctly the “View Connection” window should look like Figure 10.
8- Go back to Xcode and open the MainWindow.xib file. Add a new Tab Bar Item (see Figure 11) by selecting it from the Library. Drag the Tab Bar Item to the Tab Bar Controller (see Figure 12).
9- Click on the newly added Tab Bar Item and select the “View Controller Attributes” from the Inspector Window (see Figure 13). Set the NIB Name parameter to ThirdView (see Figure 14). Once the NIB Name is set, your MainWindow file should show the text “Loaded From ThirdView” (see Figure 15).
10- Save all your Xcode & Interface Builder files. Click “Build and Run” from Xcode. The Tab Bar Application will show up on the iPhone Simulator with a third Tab Bar Item (see Figure 16).
Get to the point: Detect Internet Connection
about 6 months ago - No comments
We will be using Apple’s reachability class to detect the state of the Internet connection. Reachability is freely available from Apple’s website: http://developer.apple.com/iphone/library/samplecode/Reachability/
1- Create a View-based Application and name it InternetConnectionState
2- Download Apple’s Reachability App source code and copy reachability.h & reachability.m files to your application’s Classes folder.
3- Add these files to your XCode project. [...]
Get to the point – Code Snippets: Dialing a number, sending SMS & Email from within your app
about 6 months ago - No comments
These code snippets will allow you to dial a number, send an SMS & send an e-mail from within your application. They will all open up the selected application and close yours.
Dialing a number
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel://123456"]];
Sending an SMS
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"sms:123456"]];
Sending an E-mail
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"mailto:amasso@amasso.info?subject=Hello&body=Testing your code snippet."]];
Get to the point: Tab Bar Application – Adding an UITableView to a Navigation Controller
about 6 months ago - 3 comments
Get to the point: Tab Bar Application – Adding an UITableView to a Navigation Controller
1- Open the previous tutorial sources (Tab Bar Application – Navigation Controller Embedded).
2- Edit the NavigationContentsViewController.h file. Change the source code so it looks like this:
#import <UIKit/UIKit.h>
@interface NavigationContentsViewController : UIViewController <UITableViewDelegate, UITableViewDataSource> {
NSMutableArray *itemsList;
UITableView *myTableView;
}
@property(nonatomic,retain)NSMutableArray *itemsList;
@property(nonatomic,retain)UITableView *myTableView;
@end
Notice the <UITableViewDelegate, UITableViewDataSource> protocols [...]
Get to the point – Code Snippets: NSString to NSInteger & vice versa
about 6 months ago - No comments
NSString to NSInteger code snippet:
NSString *strTest = [NSString stringWithFormat:@"%d", 10];
NSInteger to NSString code snippet:
NSInteger iTest = [strTest integerValue];
Get to the point – iPhone Development: Embed a Navigation controller to a Tab Bar Application
about 7 months ago - 1 comment
Get to the point – iPhone Development: Embed a Navigation controller to a Tab Bar Application
This tutorial is a continuation of the previous Tab Bar Application tutorial.
1- Open the tabbartest Xcode project. Create a new UIViewController subclass (File->New File) and name it TabBarNavigationController (see Figure 1). Make sure the “With XIB for user interface” option [...]
















about 1 month ago
Great tutorial!!!