Thursday, July 12, 2012

Learn HTML5 and JavaScript for iOS: Web Standards-based Apps for iPhone, iPad, and iPod touch


You have a great idea for a simple mobile web app. Or, you have a great idea for a complicated mobile web app. Either way,Learn HTML5 and JavaScript for iOS will help you build, fine-tune, and publish your app for iPhone, iPad, or iPod touch. Scott Preston will walk you through building a mobile web app from scratch using real-world examples. You'll learn about design considerations, mobile web frameworks, and HTML5 features like animation and graphics using Canvas. You'll also learn how to customize your app for a variety of platforms, and you'll explore testing and performance tips for your app.
  • Get an overview of HTML5, JavaScript, and mobile web frameworks
  • Discover tips for iOS usability as well as performance
  • Dig into features like images, animation, and even geolocation

What you’ll learn

  • HTML5 features
  • JavaScript and JavaScript frameworks overview
  • How to design for usability
  • How to work with Canvas
  • How to customize your iOS app depending on device and operating system
  • How to integrate with services like voice and messaging
  • How to test and optimize your app

Who this book is for

Web developers who want to move into mobile app development on iOS devices as well as mobile users and developers who want to develop cross-platform web apps.

Table of Contents

1. Getting Started
2. HTML5 In Short
3. CSS3 & Styling
4. JavaScript for Mobile
5. Mobile Frameworks
6. Site Navigation & Usability & Touch Interactions
7. Geolocation & Google Maps
8. Animation & Effects
9. Canvas & Graphics
10. Video & Audio
11. Integrating with Native Services 
12. Taking Apps Offline & Local Storage
13. Mobile Testing
14. Advanced Topics - Performance & Analytics & More
15. Going Native with PhoneGap


Tuesday, January 31, 2012

Beginning iOS 5 Development: Exploring the iOS SDK

Product Description

The team that brought you the bestselling Beginning iPhone 4 Development is back again for Beginning iOS 5 Development, bringing this definitive guide up-to-date with Apple's latest and greatest iOS SDK, as well as with the latest version of Xcode.

There's coverage of brand new technologies, with chapters on storyboards and iCloud, for example, as well as significant updates to existing chapters to bring them in line with all the changes that came with the iOS 5 SDK. You'll have everything you need to create your very own apps for the latest iOS devices, including the iPhone 4S, iPad 2, and the latest iPod touch. Every single sample program in the book has been rebuilt from scratch using Xcode 4.2 and the latest iOS 5-specific project templates and designed to take advantage of the latest Xcode features.

Assuming only a minimal working knowledge of Objective-C, and written in a friendly, easy-to-follow style, Beginning iOS 5 Development offers a complete soup-to-nuts course in iPhone, iPad, and iPod touch programming. The book starts with the basics, walking through the process of downloading and installing Xcode and the iOS 5 SDK, and then guides you though the creation of your first simple application.

From there, you’ll learn how to integrate all the interface elements Apple touch users have come to know and love, such as buttons, switches, pickers, toolbars, and sliders. You’ll master a variety of design patterns, from the simplest single view to complex hierarchical drill-downs. The confusing art of table building will be demystified, and you’ll learn how to save your data using the iPhone file system. You’ll also learn how to save and retrieve your data using a variety of persistence techniques, including Core Data and SQLite. And there’s much more! You’ll learn to draw using Quartz 2D and OpenGL ES, add multitouch gestural support (pinches and swipes) to your applications, and work with the camera, photo library, accelerometer, and built-in GPS. You’ll discover the fine points of application preferences and learn how to localize your apps for multiple languages.

  • The iOS 5 update to the bestselling and most recommended book for Cocoa touch developers
  • Packed full of tricks, techniques, and enthusiasm for the new SDK from a developer perspective
  • Written in an accessible, easy-to-follow style

What you’ll learn

  • Everything you need to know to develop your own bestselling iPhone and iPad apps
  • Best practices for optimizing your code and delivering great user experiences
  • How to create “universal” apps for both the iPhone and iPad
  • What is data persistence and why is it important
  • Get started with building cool, crisp User Interfaces
  • What and how to use Table Views
  • How to do graphics with Quartz and OpenGL ES
  • What geo app development features the new iOS 5 brings to the iPhone 4S
  • How to get your app in iCloud
  • And much much more...

Who this book is for

Everyone who wants to start developing for iPhone, iPod touch, and iPad!

For the latest sourcecode, please head to www.iphonedevbook.com.

Table of Contents

  1. Welcome to the Jungle
  2. Appeasing the Tiki Gods
  3. Handling Basic Interaction
  4. More User Interface Fun
  5. Autorotation and Autosizing
  6. Multiview Applications
  7. Tab Bars and Pickers
  8. Introduction to Table Views
  9. Navigation Controllers and Table Views
  10. iPad Considerations
  11. Application Settings and User Defaults
  12. Basic Data Persistence
  13. <...

About the Author

Dave Mark is a longtime Mac developer and author who has written a number of books on Mac and iOS development, including Beginning iPhone 4 Development(Apress, 2010), More iPhone 3 Development (Apress, 2010), Learn C on the Mac (Apress, 2008), The Macintosh Programming Primer series (Addison-Wesley, 1992), and Ultimate Mac Programming (Wiley, 1995). Dave loves the water and spends as much time as possible on it, in it, or near it. He lives with his wife and three children in Virginia.

Jack Nutting has been using Cocoa since the olden days, long before it was even called Cocoa. He has used Cocoa and its predecessors to develop software for a wide range of industries and applications, including gaming, graphic design, online digital distribution, telecommunications, finance, publishing, and travel. When he is not working on Mac or iOS projects, he is developing web applications with Ruby on Rails. Nutting is a passionate proponent of Objective-C and the Cocoa frameworks. At the drop of a hat, he will speak at length on the virtues of dynamic dispatch and run time class manipulations to anyone who will listen (and even to some who won’t). Nutting is the primary author of Learn Cocoa on the Mac (Apress, 2010) and Beginning iPad Development for iPhone Developers (Apress, 2010). He blogs from time to time at Nuthole.com.

Jeff LaMarche is a Mac and iOS developer with more than 20 years of programming experience. Jeff has written a number of iOS and Mac development books, including Beginning iPhone 3 Development (Apress, 2009), More iPhone 3 Development (Apress, 2010), and Learn Cocoa on the Mac (Apress, 2010). Jeff is a principal at MartianCraft, an iOS and Android development house. He has written about Cocoa and Objective-C for MacTech Magazine, as well as articles for Apple’s developer web site. Jeff also writes about iOS development for his widely-read blog at http://iphonedevelopment.blogspot.com.




Wednesday, March 30, 2011

iPhone for Programmers: An App-Driven Approach



The professional programmer’s DEITEL® guide to iPhone app development using iPhone SDK 3.x, Xcode®, Objective-C® and Cocoa®

More than 1.5 billion iPhone apps were downloaded from Apple’s App Store in just one year! This book gives you everything you’ll need to start developing great iPhone apps quickly and–once you’ve joined Apple’s fee-based iPhone Developer Program–to get them up and running on the App Store. The book uses an app-driven approach–each new technology is discussed in the context of 14 fully tested iPhone apps (7700 lines of code), complete with syntax shading, code walkthroughs and sample outputs. Apps you’ll develop include:
  • Welcome
  • Spot-On Game
  • Route Tracker
  • Tip Calculator
  • Cannon Game
  • Slideshow
  • Favorite Twitter® Searches
  • Painter
  • Voice Recorder
  • Flag Quiz Game
  • Address Book
  • Twitter® Discount Airfares
By Chapter 3 you’ll be building apps using Xcode®, Cocoa® and Interface Builder. You’ll learn object-oriented programming in Objective-C® and build apps using the latest iPhone 3.x technologies including the Game Kit, iPod library access and more.

iPhone for Programmers include practical, example-rich coverage of:


• iPhone SDK 3.x, XCode®, Interface Builder

• Object-Oriented Programming in Objective-C® and Cocoa®

• Collections, GUI, Event Handling

• Controllers, Application Templates

• UIView, Multi-Touch™

• Core Audio, Core Animation, NSTimer

• Tables, UINavigationController

• Map Kit, Core Location, GPS, Compass

• Photos, iPod Library Access

• Serialization

Tuesday, June 29, 2010

iPhone SDK 4 is now available to ALL registered Apple Develoers

iOS 4 is the next generation of the world's most innovative mobile operating system. Its unique capabilities and new technologies will change what's possible on a mobile platform.

iPhone SDK 4

With a rich set of over 1500 new APIs, iPhone SDK for iOS 4 provides you with an amazing range of technologies to enhance the functionality of your iPhone and iPod touch apps. Registered Apple developers can visit the iPhone Dev Center to download the iPhone SDK 4 now.




Monday, June 7, 2010

Apple Event - WWDC 10 - iPhone 4


Apple CEO, Steve Jobs introduces iPhone 4 at the company's World Wide Developers Conference in San Francisco. Features include a new glass and steel design, a built in antenna and a higher resolution screen.

Apple iPhone 4 Intro.



Friday, April 23, 2010

iPhone SDK 4 beta


With a rich set of over 1500 new APIs, iPhone SDK for iPhone OS 4 provides you with an amazing range of technologies to enhance the functionality of your iPhone and iPod touch apps. iPhone Developer Program members can visit the iPhone Dev Center to download the iPhone SDK 4 beta now.

iPhone SDK 4 beta is available for download to members of the iPhone Developer Program.

Friday, April 9, 2010

Apple iPhone OS 4.0 : Multitasking

Apple iPhone OS 4.0 : Multitasking Part 1


Apple iPhone OS 4.0 : Multitasking Part 2


iPhone OS 4 delivers seven new multitasking services that allow your apps to perform tasks in the background while preserving battery life and performance. These multitasking services include: * Background audio - Allows your app to play audio continuously. So customers can listen to your app while they surf the web, play games, and more. * Voice over IP - Your VoIP apps can now be even better. Users can now receive VoIP calls and have conversations while using another app. Your users can even receive calls when their phones are locked in their pocket. * Background location - Navigation apps can now continue to guide users who are listening to their iPods, or using other apps. iPhone OS 4 also provides a new and battery efficient way to monitor location when users move between cell towers. This is a great way for your social networking apps to keep track of users and their friends' locations. * Push notifications - Receive alerts from your remote servers even when your app isn't running. * Local notifications - Your app can now alert users of scheduled events and alarms in the background, no servers required. * Task finishing - If your app is in mid-task when your customer leaves it, the app can now keep running to finish the task. * Fast app switching - All developers should take advantage of this. This will allow users to leave your app and come right back to where they were when they left - no more having to reload the app.

Apple iPhone OS 4.0 Unvieling at Apple Special Event, April 2010 : Introduction


Apple has unveiled plans for the biggest and most exciting iPhone software update yet. iPhone OS 4 will include over 100 new user features for iPhone and iPod touch owners to enjoy. And for developers, a new software development kit (SDK) offers over 1500 new APIs to create apps that are even more powerful, innovative, and amazing.

Friday, February 12, 2010

Load background image of Button using programing code

There is a method called viewDidLoad in the controller's super class. It will be called after our view loaded. We can override it to do something after the view had been loaded, such as load background image to a button.



- Start a new iPhone OS Application using View-Based Application Template. Add a Button using Interface Builder. Assign the Tag of the button, say 10.

- Drag a image into the Resources folder. eg. Home.png, it will be our background image of the button.

- Modify our ViewController.m, un-comment the method viewDidLoad and add the code below.

- (void)viewDidLoad {
UIImage *buttonImage_Home = [UIImage imageNamed:@"Home.png"];
UIImage *stretchableButtonImageNormal = [buttonImage_Home stretchableImageWithLeftCapWidth:12 topCapHeight:0];
UIButton *homeButton = (UIButton *)[self.view viewWithTag:10];
[homeButton setBackgroundImage:stretchableButtonImageNormal forState:UIControlStateNormal];
}




Saturday, January 30, 2010

ipad development



Wednesday, January 27, 2010

Download iPhone SDK 3.2 beta today, start developing iPad Apps.


iPhone Developer Program members can download iPhone SDK 3.2 beta today, start developing the next generation of innovative applications for new Apple iPad.


iPhone SDK 3.2 beta
iPhone SDK 3.2 beta contains all the tools you need to start developing and optimizing iPhone OS applications for iPad.
iPad Simulator
The iPad Simulator lets you build and run your iPad application on your Mac, allowing you to lay out your user interface for the larger screen size, test your app’s memory usage, and shorten the debug cycle in the design process.
iPad Programming Guide
iPad provides new opportunities to create Multi-Touch iPhone OS applications on a larger display than ever. The iPad Programming Guide introduces new features available for iPad and how to implement those features in your applications.
iPad Human Interface Guidelines
Design an incredible user interface and user experience for your iPad application by following the iPad Human Interface Guidelines. Learn how to effectively use the new views and controls available to you to deliver unforgettable applications to your customers.
iPad Sample Code
Get started developing innovative universal applications for iPad, iPhone and iPod touch by downloading iPad sample code. Each sample code project is buildable and provides an example of how to accomplish a task for a specific technology.
Preparing Universal Applications
Developers can now start planning for universal applications, allowing them to take full advantage of the technologies found on iPad, iPhone, and iPod touch with a single binary.



Learn More...

Monday, January 11, 2010

AlertView

The creation and usage of Alert is very similar to Action Sheet.

Here, a AlertView will be shown if user click NO in the Action Sheet, to prompt user that the application is kept running.




- (void)actionSheet:(UIActionSheet *)actionSheet 
didDismissWithButtonIndex:(NSInteger)buttonIndex 
{ 
    if (buttonIndex == [actionSheet destructiveButtonIndex]) 
    { 
  exit(0);
    } 
 else
 {
  UIAlertView *alert =[[UIAlertView alloc]
        initWithTitle:@"No Exit"
        message:@"Application keep running"
        delegate:self
        cancelButtonTitle:@"OK"
        otherButtonTitles:nil];
  [alert show];
  [alert release];
 }
} 



Saturday, January 9, 2010

ActionSheet

In this exercise, we will implement a ActionSheet on the last exercise "Programmatically quit a iPhone OS application", to double confirm exiting after the button pressed, and before exit the application.



Action sheets are used to force the user to make a choice between two or more items. It comes up from the bottom of the screen and displays a series of buttons for
the user to select.

Modify the header file, iPhoneExitViewController.h.


#import <UIKit/UIKit.h>

@interface iPhoneExitViewController : UIViewController <UIActionSheetDelegate>{

}
- (IBAction)exitButtonPressed:(id)sender;
@end

Modify iPhoneExitViewController.m to implement the IBAction exitButtonPressed, and actionSheet.


@implementation iPhoneExitViewController
- (IBAction)exitButtonPressed:(id)sender{
 UIActionSheet *actionSheet = [[UIActionSheet alloc] 
                                  initWithTitle:@"Confirm to Exit?" 
                                  delegate:self 
                                  cancelButtonTitle:@"No!" 
                                  destructiveButtonTitle:@"Yes" 
                                  otherButtonTitles:nil]; 
    [actionSheet showInView:self.view]; 
    [actionSheet release]; 
}

- (void)actionSheet:(UIActionSheet *)actionSheet 
didDismissWithButtonIndex:(NSInteger)buttonIndex 
{ 
    if (buttonIndex == [actionSheet destructiveButtonIndex]) 
    { 
        exit(0);
    } 
} 

For sure, you have to create the UI to include a Exit button using Interface Builder, and connect the IBAction to the Exit button. Refer the article "General steps to implement and connect a IBAction".

Sunday, January 3, 2010

Programmatically quit a iPhone OS application


According to iPhone OS Reference Library Q&A, Q: How do I programmatically quit my iPhone OS application? There is no API provided for gracefully terminating an iPhone application.

Alternatively, we can use exit(0) to force the iPhone application to terminate.


@implementation iPhoneExitViewController
- (IBAction)exitButtonPressed:(id)sender{
exit(0);
}

iPhone OS Reference Library



iPhone OS Reference Library
The iPhone OS Reference Library is your bookshelf for detailed information essential to iPhone OS application development.

Tuesday, December 29, 2009

Introduction to Coding Guidelines for Cocoa

Developing a Cocoa framework, plug-in, or other executable with a public API requires some approaches and conventions that are different from those used in application development. This is where API naming conventions come in handy, to make the interfaces consistent and clear. There are also programming techniques that are special to—or of greater importance with—frameworks, such as versioning, binary compatibility, error-handling, and memory management. This topic includes information on both Cocoa naming conventions and recommended programming practices for frameworks.

Link: Introduction to Coding Guidelines for Cocoa



googledocs-cocoa-sample: Example iPhone project showing how to use GData API for Google Docs from Objective-C.

This sample iPhone application demonstrates how to use the GData API Objective-C library to log in, upload, download and rename files in Google Docs, including support for documents inside multiple levels of folders.

There are two ways to use the code.

First, the GoogleDocs.m/.h can be used as-is and plugged into an iPhone app. It should also work in a Mac OS X Cocoa app with little or no changes needed.

Second, GoogleDocs.m/.h shows an example of how to use various aspects of the GData Objective-C API. By seeing how this code works, a developer can learn the underlying API to create their own interface.

Additionally, the code demonstrates a method for packing up binary/non-user editable data files and uploading them as HTML files, then downloading and decoding the original content.

The sample application fully exercises the included interface in an app that will run on an iPhone, iPod Touch and the iPhone Simulator.

link: googledocs-cocoa-sample Project Home

Monday, December 28, 2009

Tag Attribute

Tag is a property of UIView objects, includeing views an controls. It's a number assigned to any UIView object, and will keep no change in you application.

For example, if you have more than one object, which trigger the same action method, how can you identify the actual source of the event? Tag is a good solution. As shown in my previouse exercise "Change UIView.backgroundColor using UIColor".

 UISlider *sliderRed = (UISlider *)[self.view viewWithTag:10];
 UISlider *sliderGreen = (UISlider *)[self.view viewWithTag:11];
 UISlider *sliderBlue = (UISlider *)[self.view viewWithTag:12];





Assign Tag using Interface Builder

In Interface Builder with the UIView object select, there is a Tag property in the Inspector pane, as shown in the figure. You can enter the value you want. And also you can check this Tag value in your code to identify the object.

Sunday, December 27, 2009

General steps to define and connect a IBOutlet

In Xcode development, controller class refer to object in xib using a special kind of instance variable, outlet. Outlet are declared with a special keyword, IBOutlet.

Typically, the declaration of an outet is look like this:
@property (nonatomic, retain) IBOutlet UILabel *outlet;

As a example, the text of a Label will be changed in our controller class.

modify the header file, in form of xxxViewController.h, to add declaration of the outlet.

@interface exampleViewController : UIViewController {
 UILabel *outlet
}
@property (nonatomic, retain) IBOutlet UILabel *outlet;
- (IBAction)actionMethod:(id)sender;
@end



Modify inside definition file, xxxViewController.m, to access the object using the outlet.

@implementation exampleViewController
@synthesize outlet;
-(IBAction)actionMethod:(id)sender{
 outlet.text = @"Access using outlet";
}

and have to release it in the method dealloc


- (void)dealloc {
    [outlet release];
    [super dealloc];
}



Save your works.

Connect IBOutlet in INterface Builder:

Double click on the xxxViewController.xib in Groups & Files pane, under Resources folder, to start Interface Builder.

Drag the object you want from Library to View pane, if you haven't placed it.

Hold down the Control key and drag (or drag by right button on mouse) the File's Owner in xib to over the object in View.



Release mouse button, the available outlets will be listed, select the outlet you want to connect.



that's.