Articles Tagged 'iPhone'


Xcode4: backward compatible code

Xcode 4 allows you to develop applications for iPhone or iPad with a target lower than today's iPhone OS 4.3. However the same code that comes with templates "sin" of arrogance, assuming that our application will target iPhone OS 4 or higher. Delegated in the application, for example, Xcode inserts the following lines of code:

1
2
3
4
5
6
7
BOOL ) application : ( UIApplication * ) application didFinishLaunchingWithOptions : ( NSDictionary * ) launchOptions - (BOOL) application: (UIApplication *) application didFinishLaunchingWithOptions: ( NSDictionary *) launchOptions
{
/ / Override point for customization after application launch.
self.window.rootViewController = self.viewController;
; [Self.window makeKeyAndVisible];
; return YES;
}

Continued ...

iPhone FontsBook: source code to display the system font

Rounding out the article How To: Custom fonts on iPhone OS 3. 2 I propose the FontsBook sources , a simple iPhone application that shows a table all system fonts, grouped by family.

FontsBookFontsBookFontsBook

Continued ...

Common Queue, a simple solution

In asynchronous environments, where method calls or events are released daily bread (see Adobe ActionScript or Objective-C), often the same sequence of operations is not identical to the thousandth of a second. In addition, multiple methods can I call a more general function with the risk to cancel the effect of the other one o'clock.

To clarify the concept of a prime example. Environment is often used to activate the iPhone network indicator on the status bar, indicating that there is - precisely - "traffic" network, that you are performing a download or upload (downloading or sending data).

Continued ...

Objective-C: how to rotate an image in 3D space

), un oggetto di più basso livello con innumerevoli potenzialità. The class UIView displays a pointer to the layer ( CALayer ), an object of the lower level with vast potential. The layer provides a variety of methods and properties related to displaying the contents of the view. For example, you can manipulate the contents of a view in three dimensional space. In ' sample carryover is interesting to note that the code is simple, and everything is created using Interface Builder:

Continued ...

Connect to Foursquare via ASIHTTPRequest

Foursquare allows through its API to access a range of features (many in this version 1) directly from our iPhone apps. We see, therefore, how to integrate access to Foursquare in Objective-C using the known framework ASIHTTPRequest to perform basic authentication.

Continued ...

Objective-C: obtain information from Latitude and Longitude

I respond to Mirko asking me how to make the opposite case proposed in Getting Latitude and Longitude in Objective-C .
Starting from the values ​​of Latitude and Longitude you can use the class MKReverseGeocoder to obtain a range of information, such as: city, state, address in full, chap!

Continued ...

Very short snippet: NSURL, and various possible

Returns the name of a file from the object NSURLRequest , allowing you to decide whether or not its extension:

Continued ...

Very short snippet: recording an image in the Photo Album

Easy way to save an image in the photo album of the device inside of our application (or loaded from remote):

Continued ...

Very short snippet: UIWebView, and display PDF files inside

The object UIWebView can be used to display several files. For example you can use it to display - as well as QuickTime movies or YouTube - PDF or HTML file included in our code.

Continued ...

Very short snippet: composing mail in an application iPhone, iPod or iPad

To compose mail in an application iPhone / iPod, simply add the framework MessageUI . In our controller to enter the inclusion of the framework and adopt the Protocolo MFMailComposeViewControllerDelegate :

Continued ...