Friday, 1 February 2013




HI THIS TOUTORIAL WILL HELP FULL FOR STARTUP IN IOS CREATED BY NAVEENRAJU



IOS BASICS EXPLINATIONS BY NAVEENRAJU

IPHONE SDK

  • Introduction to iPhone Architecture
  • Introduction to Development IDE - XCODE, Interface Builder
  • Creating and building simple applications
  • Handling Basic Interaction
  • Creating basic view controllers
  • Monitoring events and actions
  • Creating advanced view controllers
  • Memory Management
  • Storyboarding Integration
  • Programmatic Interface creation
  • Integrating with core services – Email, Contacts, Camera, Map kit etc
  • Data: actions, preferences, files, and addresses
  • Camera, WebKit, Mapkit and core location
  • Creating of database and using it in iPhone app
  • Introduction to url loading system
  • Debugging, testing the application

INTRODUCTION TO DEVELOPMENT IDE -XCODE,INTERFACE BUILDER




INTRODUCTION TO DEVELOPMENT IDE-XCODE:









If you are running Mac OSX 10.5, chances are your machine is already running Xcode. These are located within the /Developer/Applications folder. Apple also makes this freely available through the Apple Developer Connection at http://developer.apple.com/.
The iPhone SDK includes a suite of development tools to assist you with your development of your iPhone, and other iOS device applications. We describe these in the following table.





iPhone SDK Core Components

COMPONENTDESCRIPTION
XcodeThis is the main Integrated Development Environment (IDE) that enables you to manage, edit, and debug your projects.
DashCodeThis enables you to develop web-based iPhone and iPad applications, and Dashboard widgets.
iPhone SimulatorThe iPhone Simulator is a Cocoa-based application, which provides a software simulator to simulate an iPhone or iPad on your Mac OSX.
Interface Builder

InstrumentsThese are the Analysis tools, which help you optimize your applications and monitor for memory leaks in real-time.

The Xcode tools require an Intel-based Mac running Mac OS X version 10.6.4 or later in order to function correctly.Inside Xcode, Cocoa, and Objective-CXcode 4 is a complete toolset for building Mac OSX (Cocoa-Based) and iOS applications. The new single-windowed development interface has been redesigned to be a lot easier and even more helpful to use than it has been in previous releases. It can now also identify mistakes in both syntax and logical errors, and will even fix your code for you.It provides you with the tools to enable you to speed up your development process, therefore becoming more productive. It also takes care of the deployment of both your Mac OSX and iOS applications.The Integrated Development Interface (IDE) allows you to do the following:
  • Create and manage projects, including specifying platforms, target requirements, dependencies, and build configurations.
  • Supports Syntax Colouring and automatic indenting of code.
  • Enables you to navigate and search through the components of a project, including header files and documentation.
  • Enables you to Build and Run your project.
  • Enables you to debug your project locally, run within the iOS simulator, or remotely, within a graphical source-level debugger.
Xcode incorporates many new features and improvements, apart from the redesigned user interface; it features a new and improved LLVM (Low Level Virtual Machine) debugger, which has been supercharged to run 3 times faster and 2.5 times more efficient.This new compiler is the next generation compiler technology designed for high-performance projects and completely supports C, Objective-c, and now C++. It is also incorporated into the Xcode IDE and compiles twice as fast and quickly as GCC and your applications will run faster.The following list includes the many improvements made to this release.
  • The interface has been completely redesigned and features a single-window integrated development interface.
  • Interface Builder has now been fully integrated within the Xcode development IDE.
  • Code Assistant opens in a second window that shows you the file that you are working on, and can automatically find and open the corresponding header file(s).
  • Fix-it checks the syntax of your code and validates symbol names as you type. It will even highlight any errors that it finds and will even fix them for you.
  • The new Version Editor works with GIT (Free Open-Source) version control software or Subversion. This will show you the files entire SCM (software configuration management) history and will even compare any two versions of the file.
  • The new LLVM 2.0 compiler includes full support for C, Objective-C, and C++
  • The LLDB debugger has now been improved to be even faster, it uses less memory than the GDB debugging engine.
  • The new Xcode 4 development IDE now lets you work on several interdependent projects within the same window. It automatically determines its dependencies so that it builds the projects in the right order.
Xcode allows you to customize an unlimited number of build and debugging tools, and executable packaging. It supports several source-code management tools, namely, CVS "Version control software which is an important component of the Source Configuration Management (SCM)" and Subversion, which allows you to add files to a repository, commit changes, get updated versions and compare versions using the Version Editor tool.The iPhone SimulatorThe iPhone Simulator is a very useful tool that enables you to test your applications without using your actual device, whether this being your iPhone or any other iOS device. You do not need to launch this application manually, as this is done when you Build and run your application within the Xcode Integrated Development Environment (IDE). Xcode installs your application on the iPhone Simulator for you automatically.The iPhone Simulator also has the capability of simulating different versions of the iPhone OS, and this can become extremely useful if your application needs to be installed on different iOS platforms, as well as testing and debugging errors reported in your application when run under different versions of the iOS.While the iPhone Simulator acts as a good test bed for your applications, it is recommended to test your application on the actual device, rather than relying on the iPhone Simulator for testing. The iPhone Simulator can be found at the following location/Developer/Platforms/iPhoneSimulator.Platform/Developer/Applications.

Understanding Cocoa, the language of the Mac

Cocoa is defined as the development framework used for the development of most native Mac OSX applications. A good example of a Cocoa related application is Mail or Text Edit.
This framework consists of a collection of shared object code libraries known as the Cocoa frameworks. It consists of a runtime system and a development environment. These set of frameworks provide you with a consistent and optimized set of prebuilt code modules that will speed up your development process.
Cocoa provides you with a rich-layer of functionality, as well as a comprehensive object-oriented like structure and APIs on which you can build your applications. Cocoa uses the Model-View-Controller (MVC) design pattern.

What are Design Patterns?

Design Patterns represent and handle specific solutions to problems that arise when developing software within a particular context. These can be either a description or a template, on how to go about to solve a problem in a variety of different situations.

What is the difference between Cocoa and Cocoa-Touch?

Cocoa-Touch is the programming language framework that drives user interaction on iOS. It consists and uses technology derived from the cocoa framework and was redesigned to handle multi-touch capabilities. The power of the iPhone and its User Interface are available to developers throughout the Cocoa-Touch frameworks.
Cocoa-Touch is built upon the Model-View-Controller structure; it provides a solid stable foundation for creating mind blowing applications. Using the Interface builder developer tool, developers will find it both very easy and fun to use the new drag-and-drop method when designing their next great masterpiece application on iOS.

The Model-View-Controller

The Model-View-Controller (or MVC) comprises a logical way of dividing up the code that makes up theGUI (Graphical User Interface) of an application. Object-Oriented applications like Java and .Net have adopted the MVC design pattern.

The MVC model comprises three distinctive categories:Model : This part defines your application's underlying data engine. It is responsible for maintaining the integrity of that data.
  • View : This part defines the user interface for your application and has no explicit knowledge of the origin of data displayed in that interface. It is made up of Windows, controls, and other elements that the user can see and interact with.
  • Controller : This part acts as a bridge between the model and view and facilitates updates between them. It binds the Model and View together and the application logic decides how to handle the user's inputs.



INterface builder:


BY USING COCOA APPLICATION:




code for above video demo
myclass1.h


//
//  myclass1.h
//  InterfaceBuilderDemo2
//
//  Created by apple on 02/02/13.
//  Copyright (c) 2013 apple. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface myclass1 : NSObject
{
    IBOutlet NSTextField *myLable;
}




-(IBAction)send1:(id)sender;
-(IBAction)send2:(id)sender;

@end

myclass1.m


//
//  myclass1.m
//  InterfaceBuilderDemo2
//
//  Created by apple on 02/02/13.
//  Copyright (c) 2013 apple. All rights reserved.
//

#import "myclass1.h"

@implementation myclass1
-(IBAction)send1:(id)sender;
{

    [myLable setStringValue:(@"Hello")];


}



-(IBAction)send2:(id)sender;
{



  [myLable setStringValue:(@"HelloWorld")];




}

@end


Document.xib



IN IPHONE



code for above video demo


  ViewController.h



//
//  ViewController.h
//  InerfaceBuldingDemo
//
//  Created by apple on 02/02/13.
//  Copyright (c) 2013 apple. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface ViewController : UIViewController

@property (strong, nonatomic) IBOutlet UILabel *myLable;
- (IBAction)hello:(id)sender;
- (IBAction)HelloWorld:(id)sender;

@end

  ViewController.m


//
//  ViewController.m
//  InerfaceBuldingDemo
//
//  Created by apple on 02/02/13.
//  Copyright (c) 2013 apple. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (IBAction)hello:(id)sender {
    self.myLable.text=@"hello";
}

- (IBAction)HelloWorld:(id)sender {
    self.myLable.text=@"Hello World";
}
@end


  ViewController.xib



















No comments:

Post a Comment