
Articles with tag 'Apple'
Thanks
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 instance of the NSFileManager and not its meotodo class defaultManager , as the latter returns an instance singleton, that is always the same pointer to object (not thread safe).
10 useful snippets Objective-C
Move the Double Tap on the simulator
The simulator iPhone / iPad in Xcode allows you to simulate the double tap by pressing the ALT key. This is useful for simulating the function of Pinch, that used to zoom in or distances one contained in the scroll 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 simply hold down the SHIFT key.
Objective-C: how to rotate an image in 3D space
), un oggetto di più basso livello con innumerevoli potenzialità. The class UIView exposes a pointer to the layer ( CALayer ), subject to a lower level with endless potential. The layer provides a number of methods and properties related to the display of the contents of the view. For example, you can manipulate the contents of a view in three dimensional space. Nell ' example that I report is interesting to note that the code is simple, and the whole is made using Interface Builder:

Very short snippet: detect iPad on the device and on the Web
Not just the browser or desktop portatitli browsing the sites by us, now the era of mobile - mobile browser - is widespread, thanks to devices such as the Apple iPhone, iPad, Android, etc ... Moreover, even for those who develop 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:
UIWebView: intercept the opening of a Link
The object UIWebView component is a really useful and versatile, ideal for solving many problems. Not only is it perfect for displaying an HTML page on the net, but you can use it for other useful purposes such as:
- Quickly display PDF documents
- View videos or images
- Display content HTML / CSS local
- Fake content in the prototype stage ...
iPhone: remove the shadow effect when scrolling in a UIWebView
In this last period I worked on three applications for Apple iPhone, almost simultaneously. Two have already been approved by Apple and can be found on the App Store: thefirst and iMakeLove .
In both applications have adopted the use of an object UIWebView to display instructions.
The object UIWebView has ilevato really convenient in this case. It allowed me to quickly view and a nice text, accompanied, in the case of images, and anything else it can be viewed on a web page (Flash on iPhone not included).

The object UIWebView is really versatile and requires very few settings to be used. Only defect is the presence of a mysterious shadow that appears when you scroll outside the control of, or at the bottom than at the top:

After some research I realized that this behavior depends on the SDK, in particular the latest updates. In addition, Apple has not released any official statement on how to remove it, on the contrary, he rejected as code does not permit a series of hacks that make use of private functions or not documenting. Eventually I gave up, both for time and because the solutions seemed all out of the box Apple.
Fortunately, the solution came to me, I hope fairly regular, which seems to solve the problem (thanks to Adolfo ):
1 2 3 4 5 6 | / / WebView is the control UIWebView [ webView.subviews objectAtIndex : 0 ] ; id = scroller [webView.subviews objectAtIndex: 0]; UIView * subView in [ scroller subviews ] ) for (UIView * subView in [scroller subviews]) subView class ] description ] isEqualToString : @ "UIImageView" ] ) if ([[[subView class] description] isEqualToString: @ "UIImageView"]) ; subView.hidden = YES; |
As pointed out by Adolfo this is still a hack that may stop working with future releases of the SDK.
How to create a delegate with its own protocol
Even in the most simple tutorial you can meet the use of protocols. It will certainly happen to many to use in your view controller a protocol, inputting, next to the interface definition, a statement similar to:
1 2 3 | UIViewController <uiwebviewdelegate> { @ Interface MyViewController: UIViewController {<uiwebviewdelegate> ... } |
AppleSide: iPad, Apple, and more
AppleSide is the new magazine weblog Saidmade dedicated Apple universe, presented close to the presentation of the new Apple iPad. On the magazine - with a professional cut - you will find many news and info dedicated to the bitten apple: including a whole section dedicated to the brand new iPad! In addition there will be a whole section dedicated to the development, edited by me.








Latest Comments
Daniela : Hello! I try to ask a help to solve my problem. I'm migrating my blog from tumblr to ...
Ludovica : Hello! I'll explain my doubt. When I write a post not add pictures in the article (if so ...
Giovambattista Fazioli : @ ale: As shown @ Kevin see on GitHub repo: https://github.com/gfazioli/Ch roma-Key
Giovambattista Fazioli : @ Kevin: See https://github.com/gfazioli/Ch roma-Key
Kevin : Very nice example - would like to see the. fla too!