Building "HelloWorld" by using Interface Builder in iPhone
1. For developing an iPhone application you have require mac OS and Xcode IDE. I hope you have both MAC OS and Xcode
IDE. Click on Xcode you can see menu of Xcode in top of your desktop. Choose File=>New=>Project and you can see above
Template Choose Application and View-based Application and click on Next button.
IDE. Click on Xcode you can see menu of Xcode in top of your desktop. Choose File=>New=>Project and you can see above
Template Choose Application and View-based Application and click on Next button.
2. Now You can see another template to give your Product Name "HelloWorld" and Company Identifier
"com.iosdeveloper.weebly" and Click on Next button
"com.iosdeveloper.weebly" and Click on Next button
3. Now choose your product location and click next you can see your project is created on your choosed location now you
can see your project navigation window and click on HelloWorldViewController.xib file
can see your project navigation window and click on HelloWorldViewController.xib file
4. Now put Label object middel of your Interface Builder and change Text property in Inspector pan right side of your
Xcode. If you can not see Inspector pan in top right corner View choose right symbol. When you put label on
the screen you can see blue guideline.
Xcode. If you can not see Inspector pan in top right corner View choose right symbol. When you put label on
the screen you can see blue guideline.
5. Now Build and go Application run in Simulator you can see "HelloWorld" middle of the screen.
Building "HelloWorld" by using code in iPhone
Create View-Base application and give name HelloWorld1 and click on HelloWorldViewController.m file and change
viewDidLoad() method.
- (void)viewDidLoad
{
UILabel * helloWorld=[[UILabel alloc]initWithFrame(0,0,320,520)];
helloWorld.text=@"HelloWorld";
helloWorld.textAlignment=UITextViewAlignmentCenter;
[self.view addSubView:helloWorld];
[super viewDidLoad];
}
Now click build and Go.
viewDidLoad() method.
- (void)viewDidLoad
{
UILabel * helloWorld=[[UILabel alloc]initWithFrame(0,0,320,520)];
helloWorld.text=@"HelloWorld";
helloWorld.textAlignment=UITextViewAlignmentCenter;
[self.view addSubView:helloWorld];
[super viewDidLoad];
}
Now click build and Go.
Releted Posts :
1. UIText Field with default and number pad keybord
2. Animation like a toggle button in iphone
3. UIActionSheet button event in iphone
4. Create combobox using UIActionsheet
5. UISegmented control in iPhone with value change event
6. Create simple UINavigation controller in iPhone
2. Animation like a toggle button in iphone
3. UIActionSheet button event in iphone
4. Create combobox using UIActionsheet
5. UISegmented control in iPhone with value change event
6. Create simple UINavigation controller in iPhone
HTML Comment Box is loading comments...