
Articles Tagged '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 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).
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.
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:

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:
UIWebView: catch the opening of a Link
The object UIWebView component is a very useful and versatile, ideal for solving many problems. Not only is perfect to display an HTML page on the net, but you can use it for other useful purposes such as:
- Quickly display PDF documents
- View videos or pictures
- Display content HTML / CSS local
- Contained in the prototype stage fake ...
iPhone: Eliminate the shadow effect when scrolling a UIWebView
In this last period I worked on three applications for Apple iPhone, virtually simultaneously. Two have already been approved by Apple and are located on the App Store: thefirst and iMakeLove .
In both applications have adopted the use of an object UIWebView to display the instructions.
The object UIWebView ilevato was really comfortable in this case. It allowed me to quickly view and a nice text, images, and accompanied, if anything else is displayed on a Web page (Flash on iPhone not included).

The object UIWebView is really versatile and needs very few settings to be used. The only defect is the presence of a mysterious shadow that appears when you make a scroll out of the area of control is at the bottom than at the top:

After several searches I realized that this behavior depends on the SDK, especially the latest updates. And Apple has not released any official statement on how to remove it, on the contrary, he rejected as code is not allowed a series of hacks that make use of sensitive functions, or documenting. Eventually I gave up, both in terms of time, and because the solutions seemed all out of the box Apple.
Fortunately I got the solution, I hope fairly regular basis, 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 , however this is a hack that may stop working with future releases of the SDK.
How to create your own protocol with delegated
Even in the most simple tutorial you can find the use of protocols. It will certainly happen to many in your view controller to use a protocol, inputting, next to the definition of the interface, 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 behind the presentation of the new Apple iPad. On the magazine - with a professional edge - 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 myself.








Latest Comments
Mark : @ Mark: Thanks for the answer. For example, if you have a code to save / use the folder ...
Mark : Thanks for the answer. For example, if you have a code to save / use the folder ...
Giovambattista Fazioli : @ Mark: in principle, absolutely, a lot depends on how and what to download. La. ..
Mark : Hello, good guide! I wanted to ask, you can use the same code to run a sql database? Instead of ...
Joseph : Hi I wanted to ask you how you can do in the post I uploaded a gallery of 50 images, for example, ...