Category 'iPad'


With multiple video AVQueuePlayer

The class MPMoviePlayerController has the big drawback of not properly handle multiple concurrent video, as well as make it difficult to create a video sequence, one after another. che è una sottoclasse di AVPlayer ), appartenente al framework più a basso livello AVFoundation , è invece estremamente più versatile, nonostante mantenga egualmente una semplicità nell'implementazione. The class AVPlayer (or AVQueuePlayer which is a subclass of AVPlayer ) belonging to the lower-level framework AVFoundation , but it is extremely versatile, equally despite maintaining simplicity in implementation.

Frameworks Block Diagram

Continued ...

Objective-C: how best to use the property list files

One of the advantages of the Property list files, which are simply text files that follow the XML standard, is that you can instantly be transformed into objects (such as array or dictionary) Objective-C. When you create a file list Property:

Property List

Continued ...

Very short trick: log JavaScript objects

If you are to develop in an environment where it is impossible to use the debugging tools like FireBug , such as the Apple iPhone simulator in Xcode, it can become frustrating to find problems, including an incorrect access to all properties of an object. Here is that the use of works alert() is fundamental!

Continued ...

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 ...

Objective-C: Notifications and Delegates

In Objective-C we have two very used to receive and send messages between classes: notifications and delegates. The difference between the two, besides being at the implementation level, substantially depends on "how" - objects - can receive a message. First let me show how the concept was born of delegate.

Continued ...

Very short snippet: NSConnection POST with parameters

che in modalità POST . The object NSMutableURLRequest can be used in either GET mode in POST . . The parameters, however, must be formatted as if they were in GET , ie in the sequence nome_campo1=valore1&nome_campo2=valore2&... . Here's a useful snippet to simplify the construction of fields:

Continued ...

Objective-C: public, protected, and private

I wrote a similar article recently for ActionScript: ActionScript 3.0: public, protected, private and internal . Rereading it I realized two things: the first was the extreme resemblance to Objective-C, although the latter does not include internal .

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 ...

Very short trick: how to use NSFileManager

, in quanto quest'ultimo restituisce un'instanza singleton, cioè sempre lo stesso puntatore ad oggetto (non thread safe). Apple recommends using the object instance NSFileManager and not its class meotodo defaultManager , as the latter returns an instance singleton, ie the same pointer to the object (not thread safe).

Continued ...

How To: Custom fonts on iPhone OS 3.2

With the release 3.2 of IOS you can include your own fonts in an application resource to be used exactly as those supplied with the system:

file. Applications That want to use custom fonts can now include fonts Those In Their application bundle and register with the system by Those fonts Including the UIAppFonts Their key in Info.plist file. The value of this key is an array of strings Identifying the font files in the application's bundle. When The System Sees the key, it loads the specified fonts and Makes Them available to the application.

Continued ...



Stop SOPA