Articles Tagged 'Xcode'


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

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

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

Coding Guidelines

When no longer working alone for all developers comes time to find guidance in the writing of code. Protocols and standards that make it possible to "read" easily and intervene (more easily) in the code of others.
When we are working on a project more programmers, often of different languages, you must find a common form of writing, internal and external documentation standards in the code. In my work I am usually to interact with:

  • Objet-C, C / C + +
  • PHP
  • HTML
  • JavaScript
  • Actionscript
  • CSS

Continued ...

10 useful snippets Objective-C

Move the double-tap on the simulator

The simulator iPhones / iPad Xcode allows you to simulate the double tap the Alt key is pressed. This is useful to simulate the function of Pinch, that used to enlarge or scroll Keep away content in the view with objects or UIWebView . Well, some of you have noticed that the simulation of the "two fingers" proceeds in a symmetrical manner always starting from the center of the screen. To move this "center" is also just hold down the SHIFT key.

Continued ...

How to develop in PHP with Xcode and Objective-C

How many programmers to use, I also build my own library of functions ready to be reused in multiple projects and multiple contexts. Let me change the title of this post, maybe a little 'risky but, nevertheless, as we shall see, not far from reality.

In Objective-C you can write and call C / C + +, including the assembly for that matter. This characteristic makes it a very versatile language and, in some respects, phenomenal. On the one hand, you can use and appreciate the purely syntax of Objective-C, on the other you can run faster porting code written in ANSI C (perhaps for Digital Unix or Sun) and can comfortably fit into our iPhone or iPad applications; not to mention all the BSD kernel is already available on Mac OS X!

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

iPad: handle boot screens

Apple iPhone and iPod were used to manage a single image file to load the application, the file Default.png . Apple iPad, however, the different management orientation requires the use of multiple image files, to be sure you see the splash screen correctly based on the orientation of the device. During application startup, as was the case for the iPhone, it is not possible to intervene to code for "wonder" as the device-oriented. Fortunately it was introduced in automatic loading of special files depending on the orientation:

The files are currently supported, in addition to the classic Default.png do not recommend to use because it is scaled and deformed according to guidance, are:

  • Default-Portrait.png
  • Default-PortraitUpsideDown.png
  • Default-Landscape.png
  • Default-LandscapeLeft.png
  • Default-LandscapeRight.png

e LandscapeRight possono essere utilizzate per determinare orietamento e verso di quest'ultimo. Versions PortraitUpsideDown , LandscapeLeft and LandscapeRight can be used to determine orietamento and toward the latter.

Application to start, then, as recommended by Apple, it's good "redesign" - where necessary - our views acting within application:didFinishLaunchingWithOptions .

Continued ...



Stop SOPA