Getting Started with iPhone Development

Getting Started with iPhone Development

Absolute Beginner’s Guide to iPhone Development | Getting Started with iPhone Development | Hello World iPhone Tutorial. This tutorial is focused on getting “Hello World” application running on iPhone simulator. 10 Easy step Tutorial to create your hello world iPhone application.

Related posts:

  1. Beginner iPhone SDK Hello World Tutorial [Example & Code] In this tutorial I will walk to you through creating…
  2. iPhone SDK Tutorial – {Part 4} Tips for UITableView Design [Add Header, Footer, Background Images & change Design] UITableView Tutorial: {Part 4} This tutorial will explain, how you…


Basic Questions before You start iPhone Development

Basic Questions before You start iPhone Development

One person from India asked me few question for iPhone development and below you can find answer’s to those questions. If you have any question regarding iPhone Development, please add in comments and I will try to response them.

1) i am not registered developer so far, i will be registered with in 2,3 dayes.. so […]

Related posts:

  1. Bypass Code Signature & Published Your Application on Cydia Published iPhone Application On Cydia. Build your application for jail…
  2. iPhone Video Tutorial: Bypassing Code Signature in Xcode & Installing jail-break application to iPhone Video Tutorial to bypass code signature in Xcode and installing…
  3. Five things you should know for building iPhone applications Five things you know before you start developing iPhone applications:…


iPhone Tutorial for Retrieving Contact information from AddressBook

iPhone Tutorial for Retrieving Contact information from AddressBook

Introduction
In this tutorial I will explain how you can retrieve a Contact(s) from your AddressBook (in iPhone) though coding. In iPhone you can retrieve contact information stored in address book easier then you can think. You can retrieve their pictures (photos), email address(es) and anything user stored in AddressBook. Note: iPhone provided easy access to […]

Related posts:

  1. get Image from Contact stored in AddressBook [iPhone] Retrieve Images from AddressBook…
  2. iPhone Tutorial for Creating a Splash Screen Introduction: Some people asked me about creating a splash screen…
  3. iPhone Programming Tutorial {Part 7}: Adding Pictures into your table using Interface builder Creating iPhone Application: Introduction: I am going to write series…


iPhone Programming Tips: Dialing number, opening Email & SMS applications

iPhone Programming Tips: Dialing number, opening Email & SMS applications

Introduction
iPhone SDK did not gives you full control over iPhone functionality. But there are few things you can do using iPhone SDK, like, you can dial a number from your application, you can open an email and SMS client from your application.
Request Full Filled
This tutorial is for Sudha who requested for this in “Request iPhone […]

Related posts:

  1. iPhone Programming Tutorial {Part 7}: Adding Pictures into your table using Interface builder Creating iPhone Application: Introduction: I am going to write series…
  2. Five things you should know for building iPhone applications Five things you know before you start developing iPhone applications:…
  3. iPhone Programming Tutorial: Complete List of UITableView Tutorials + Videos Complete List of UITableView tutorials plus few video tutorials as…


iPhone SDK Tutorial – {Part 5}: Add, Delete & Reorder UITableView Rows

iPhone SDK Tutorial – {Part 5}: Add, Delete & Reorder UITableView Rows

This tutorial will explain, how you can change the UITableView data. In this tutorial, I will add, delete and re-order rows in UITableView. I will be using navigation code here.

Related posts:

  1. iPhone Programming Tutorial: {Part 3} Grouped UITableView I am going to write series of UITableView tutorials (Video…
  2. iPhone Programming Tutorial – {Part 1} UITableView using NSArray Creating iPhone Tutorial Introduction: I am going to write series…
  3. iPhone Programming Tutorial: Part 6: Creating custom UITableViewCell Using Interface Builder [UITableView] This tutorial will help you to create custom rows in…


iPhone Programming Tutorial: Part 6: Creating custom UITableViewCell Using Interface Builder [UITableView]

Introduction:

I am going to write series of UITableView tutorials (Video Tutorials as well). My target is to make the customized UITableView using UITableViewCell which is requested on “Request Tutorial” page. Following are the list of tutorials, which I will be posting on this blog:

1. Create a Simple UITableView [Populate UITableView With Array]
2. Navigatation in UITableView [Navigatation on UITableView using didSelectRowAtIndexPath]
3. Grouped UITableView [Using Interface builder]
4. Tips for UITableView Design [Change UITableView properties i.e background colour, accessory type, add footer and header]
5. Add, Delete & Re-order UITableView rows
6. Creating UITableView using UITableViewCell
7. Adding Pictures into your UITableView using Interface builder
8. UITableView & UITableViewCell examples and tips

[Note: If you want more tutorials on UITableView or UITableViewCell, then add a comment on “Request Tutorial” Page]

Idea of this tutorial:

UITableViewCell tutorial will explain how you can use UITableViewCell in UITableView. Custom UITableViewCell using Interface builder makes table view design very easy. Using UITableViewCell gives you lot of customization over the design of each row. You can easily reduce number of code lines by using UITableViewCell (i.e reduce customization code and easy to manage your table). There are few things which are little hard to do using UITableView but using UITableViewCell they are easily manageable i.e you can manage your cell code in a separate class, you can change the design of cell using nib files more easily then writing codes. So in my point of view, custom UITableViewCell using Interface builder makes your life more easy while developing applications for iPhone.

So in this tutorial, i will write only UITableViewCell and link it with UITableView. I will be using part 2 code, which you can grab from here. Final output of this code will be same as part two but to change the design on table will be really simple. You can watch the video tutorial at the end to skip all the text.

customize UITableView using UITableViewCell
customize UITableView using UITableViewCell

Steps to follow

Follow these steps to achieve the output like above:

Step 1: Open the SimpleTable project in Xcode (you can grab this code from here. [Note: I am using UITableView part 2 code here]). In Xcode, ‘Group and Panel’ right click on classes, select >Add> New File..>. Now select UITableViewCell and name it ‘TableViewCell’, press finished.

Add UITableViewCell
Add UITableViewCellSelect UITableViewCell from wizard
Select UITableViewCell from wizard

Name the UITableViewCell class
Name the UITableViewCell class

Step 2: Now in ‘TableViewCell.h’ file add following code before @end and after #import:

1.@interface TableCellView : UITableViewCell {
2.IBOutlet UILabel *cellText;
3.}
4.
5.- (void)setLabelText:(NSString *)_text;

Step 3: Now open ‘TableViewCell.m’ file and write a setter method for label like this:

1.- (void)setLabelText:(NSString *)_text;{
2.cellText.text = _text;
3.}

Step 4: Open SimpleTableViewController.h file and write following:

1.#import "TableCellView.h"
2.@interface SimpleTableViewController : UIViewController {
3.IBOutlet UITableView *tblSimpleTable;
4.NSArray *arryData;
5.IBOutlet TableCellView *tblCell;
6.}

Step 5: Open SimpleTableViewController.h file and import ‘TableCellView.h’ at top.

1.#import "TableCellView.h"

In cellForRowAtIndexPath method remove all the code or either comment the code. Add the following code in that method:

01.static NSString *MyIdentifier = @"MyIdentifier";
02.MyIdentifier = @"tblCellView";
03.
04.TableCellView *cell = (TableCellView *)[tableView dequeueReusableCellWithIdentifier:MyIdentifier];
05.if(cell == nil) {
06.[[NSBundle mainBundle] loadNibNamed:@"TableCellView" owner:self options:nil];
07.cell = tblCell;
08.}
09.
10.[cell setLabelText:[arryData objectAtIndex:indexPath.row]];
11.return cell;

Step 6: Now open NextView.xib file from your Xcode project. Press cmd + shift + s to save as this file, and give it a name TableViewCell and ‘Add’ to ‘SimpleTable’ project:

Save As nib file
Save As nib fileSave As nib file
Name UITableViewCell xib file
Save As nib file
Save nib file

Step 7: Now in TableViewCell.xib file, select ‘View’ and then select Edit>Delete (or press ‘back space’ button) to remove the View from xib file

Save As nib file
Remove View from TableCellView.xibSave As nib file
Deleted View from TableCellView

Step 8: Now press cmd + shift + l to open Library. Drag ‘Table View Cell’ to ‘TableViewCell.xib’ file. Select ‘Table View Cell’ and press cmd + 4 and write ‘TableCellView’ in class and press cmd + 1 and write ‘tblCellView’ in Identifier.

Save As nib file
Add UITableViewCell to nib fileSave As nib file
Assign Class to Table Cell View

Save As nib file
Add Identifier to Table Cell View

Step 9: Now select ‘Files Owner’ and press cmd + 4 and type ‘SimpleTableViewController’ in class. Also press cmd + 2 and drag tblCell to ‘Table View Cell’ like in the below picture:

Save As nib file
Give class name to File’s Owner
Save As nib file
Map UITableViewCell to Table View Controller

Step 10: Now drag a label inside UITableViewCell and select ‘TableViewCell’, drag cellText with label.

Save As nib file
Map Label

Step 11: Save the interface builder and your code. Run the application and you will see the output like this:

Save As nib file
Custom UITableViewCell Output

Looked at bottom pictures to change the color of labels and cell Accessory:

Save As nib file
Change Table Cell View Accessory

Save As nib file
Change Label Text colour

Save As nib file
Label Colour text change

Run the application and you will see the final output.

Save As nib file
Final Output of Custom UITableViewCell

Custom UITableViewCell code

You can grab this code from here.

Now watch me doing it


iPhone Tutorial for Creating a Splash Screen

iPhone Tutorial for Creating a Splash Screen

Introduction:
Some people asked me about creating a splash screen in iPhone. So today I am going to write a simple tutorial on creating splash view for your application. I will write another post on good looking splash page as well. Its really a small thing but have a really good impact on your users.

So lets […]

Related posts:

  1. iPhone Programming Tutorial: Part 6: Creating custom UITableViewCell Using Interface Builder [UITableView] This tutorial will help you to create custom rows in…
  2. iPhone Programming Tutorial {Part 7}: Adding Pictures into your table using Interface builder Creating iPhone Application: Introduction: I am going to write series…
  3. iPhone Tutorial for Retrieving Contact information from AddressBook Introduction In this tutorial I will explain how you can…


iPhone Programming Tutorial {Part 7}: Adding Pictures into your table using Interface builder

Creating iPhone Application: Introduction:

I am going to write series of UITableView tutorials for iPhone (Video Tutorials as well) to help developers and programmers to make a new applications for Apple store. This series of tutorials help you create/build iPhone applications more easily and fast. Following are the list of iPhone tutorials, which I will be posting on this blog:

iPhone Programming Tutorial -Table View- Part 1: Create a Simple UITableView [Populate UITableView With Array]
iPhone Programming Tutorial -UITable View- Part 2: Navigatation in UITableView [Navigatation on UITableView using didSelectRowAtIndexPath]
iPhone Programming Tutorial – Part 3: Grouped UITableView [Using Interface builder]
iPhone Programming Tutorial – Part 4: Tips for UITableView Design [Change UITableView properties i.e background colour, accessory type, add footer and header]
iPhone Programming Tutorial – Part 5: Add, Delete & Re-order UITableView rows
iPhone Programming Tutorial – Part 6: Creating UITableView using UITableViewCell Using Interface Builder
iPhone Programming Tutorial – Part 7: Adding Pictures into your UITableView using Interface builder
iPhone Programming Tutorial Examples Part 8: UITableView & UITableViewCell examples and tips

[Note: If you want more iPhone tutorial’s on UITableView or UITableViewCell, then add a comment on “Request for Beginner iPhone Tutorial” Page]

Idea of this iPhone tutorial:

In my last iPhone tutorial on table, I explain how you can easily design table using UITableViewCell. In this tutorial, I will explain how you can add images and labels to your UITableView. So in this tutorial, i will add few lines in UITableViewCell class and add images to cell xib file.


Final output of this tutorial will look like this. You can watch the video tutorial at the end.

customize UITableView using UITableViewCell
Table design using Interface builder

iphone programming tutorial steps to follow (10 Steps to add pictures):

Follow these steps to achieve the output like above:

Step 1:Open the last tutorial code (You can grab this code from here) and add following 6 images to your project resources folder by dragging in to xcode.

iPhone TutorialiPhone TutorialiPhone TutorialsiPhone SDK tutorialiPhone sdk tutorialiphone sdk tutorials

iphone table view tutorial
add images to iPhone resource folder
iphone tableview
Please make sure, copy check box is selected

Step 2: Now open TableCellView.h file and add one Label & UIImageView

1.IBOutlet UIImageView *productImg;
2.IBOutlet UILabel *descriptionText;

Also Add these two methods definition in TableCellView.h, for setting the values for label and Image.

1.- (void)setDescpText:(NSString *)_text;
2.- (void)setProductImage:(NSString *)_text;

Step 3: Add these methods body in TableCellView.h file

1.- (void)setDescpText:(NSString *)_text;{
2.descriptionText.text = _text;
3.}
4.
5.- (void)setProductImage:(NSString *)_text;{
6.productImg.image = [UIImage imageNamed:_text];
7.}

Step 4: Add two NSArray’s in SimpleTableViewController.h

1.NSArray *imagesList;
2.NSArray *descpList;

Step 5: In SimpleTableViewController.m file, move to viewDidLoad method and overwrite the arryData with these lines of code:

1.arryData = [[NSArray alloc] initWithObjects:@"iPhone",@"iPod",@"MacBook",@"MacBook Pro",@"Mac Mini"@"iPhone 3G S",nil];
2.imagesList = [[NSArray alloc] initWithObjects:@"1.jpg",@"2.jpg",@"3.jpg",@"4.jpg",@"5.jpg",@"6.jpg",nil];
3.descpList = [[NSArray alloc] initWithObjects:@"Price 500$",@"Price 50$",@"Price 1,000$",@"Price 1,200$",@"Price 800$",@"Price 700$",nil];

Step 6: In cellForRowAtIndexPath method, add these two lines before return statement

1.[cell setProductImage:[imagesList objectAtIndex:indexPath.row]];
2.[cell setDescpText:[descpList objectAtIndex:indexPath.row]];

Step 7: Now open TableCellView.xib file in Interface Builder. Select “Table Cell View” and change its height to 65.

iphone table view
change table cell height from interface builder

Step 8: Add UILabel and UIImageView to the cell design like this

iphone table tutorial
add labels and image to cell

Step 9: Map UILabel & UIImageView to TableCellView.h file

iphone uitableview
map label from interface builder to your class
iphone uitableview tutorial
map label from interface builder to your class

Step 10: Last step, open SimpleTableViewController.xib file and select Table. Press cmd + 3 and change the height of row to 70.

iphone table cell tutorial
change table row height from interface builder

Run the application and you will see the final output.

iphone tutorial
final result of customizing table cell from interface builder

Code for iPhone application:

Click here for the code Project code.

Beginner iPhone SDK Hello World Tutorial [Example & Code]

In this tutorial I will walk to you through creating a simple “Hello World” application using interface builder. There are many ways that a Hello World program could be made on the iPhone, I am going to show you the simplest.

Related posts:

  1. Getting Started with iPhone Development Absolute Beginner’s Guide to iPhone Development | Getting Started with…
  2. Bypass Code Signature & Published Your Application on Cydia Published iPhone Application On Cydia. Build your application for jail…