Showing posts with label iPhone. Show all posts
Showing posts with label iPhone. Show all posts

Sunday, 23 December 2012

TextField in iPhone and How Keypad Go

This is my third tutorial for iPhone UI controls and today we will learn..

how to create a simple Text Field.
when i was started to work on iPhone programming, i got one strange thing that after entering the text in Text field the keypad will not go back and i got stuck.

so i have also write
How to Make the keyboard go away after entering Text?

my development environment is
iOS 5.0 on Mac OS X Lion with Xcode 4.2

Getting Started
Open up Xcode and create a new project with the iOS\Application\Single View Application template. 


 For the Product Name enter "TextField", for the Device Family choose iPhone and go next..

open header file "TextFieldViewController.h" and modify it like this..

now come to implementation file, open "TextFieldViewController.m" add two methods body at the end of file (remember we have already declared these method in header file)

now modify "viewDidUnload" method and release the ui controls
finally your "TextFieldViewController.m" file will look like this..

okay!! enough code now lets play with UI so just open "TextFieldViewController.xib" file
now drag TextField, Label and Button on View this way..
our phone no Text-Field should have number keypad so change like this
we are almost done! we have written code and drawn UI controls on view.. now we need to connect these so do this
1. connect Text-Field, Label and Button through File owner
  (i) Text-Field
 (ii) Label and do same for Button also

2. connect keyPadGo and showData method through  file owner
 (i) keyPadGo
 select "Did End On Exit" event
 (ii) showData
 select "Touch Up Inside" event


cheers!!
I'd love to hear your thoughts!!

Install iOS sdk and XCode IDE on Mac OS X

So you are going to be a iPhone application developer.. Great!! this is the right wall where you get step by step sdk and IDE installation for iPhone/iPod/iPad application development in simple way..

Here i am installing
iOS SDK 5.0 and XCode IDC 4.2

remember this installation will need 10 GB space free on your Hard Disk
so before start installation make sure you have sdk and IDE tool's "DMG" file like this..


now double click this file and you will get
when you start installation the first window will be this so go continue..
Accept the Apple's agreement and go ahead..
so here you can see what are the tools going to install and how much free required on HDD
in Next step go with default destination ,then put User name and Password to continue
now its installing..
Great now we have installed iOS sdk and XCode..

so now you have to go this path to start XCode
on Top Menu Bar click on "Go">> "Computer">> "your hard disk"

then go to here..
/Developer/Applications/Xcode.app
it will look like this
and... Xcode is starting in this way...
Here we going for Hello World Program in iPhone so you should click here..


I'd love to hear your thoughts!!

iOS.. an introduction

The iOS is the default operating system of the iPhone, the iPod Touch, and the iPad.


iOS (iPhone OS) is an Apple's mobile operating system. Originally developed for the iPhone, iPod Touch and iPad.This Operating System is programmed in  C, C++ and Objective C and kernel type is Hybrid (XNU). latest version is iOS 5.0





 To develop iOS applications, you use iOS SDK and  Xcode, (Apple’s IDE). As you develop the application, you run it on a Mac, and on iPhone, iPad, or iPod touch devices.

so, what you will need to know ? before start iOS applications development.
# Basic Programming skills like C and Oops.
# Familiarity with the iPhone and
# Familiarity with Objective C.

okiey friends...in the next blog i will define step by step how to write "HelloWorld" application for iPhone.. :p