Articles Tagged 'iPad'


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

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

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

Very short snippet: detect iPad on the device and on the Web

Not only browsers portatitli desktop or browsing the sites developed by us, now the era of mobile - the mobile browser - is widespread, thanks to devices like the Apple iPhone, Android, etc ... Furthermore, even for developers for the Apple iPhone has become mandatory to understand to which device the application is running.

On the Web, the situation is similar to that displayed in the Browser or Mobile Browser? , with the variant:

Continued ...

Private APIs in the removal of the scroll in a UIWebView object

In Very short snippet: Remove scroll from a UIWebView object we saw how it was possible to remove the scroll from an object UIWebView :

Continued ...

Very short snippet: Remove scroll from one object to UIWebView

Documented or undocumented, a feature, sometimes, you are forced to implement by force! Useful in some situations, the scroll is to remove an object from UIWebView . : Interestingly, in general, see how you can access the components 'internal' part of the object in question: in this example retrieves the object pointer UIScrollView present in the subject UIWebView :

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