Working with Interface Builder can be spontaneously use an object UIImageView to set the background of our view controller. Alternatively, you can delete this object, thus saving a little 'memory, and take advantage of the view associated with the view controller. Just plug in our view controller:
Articles Tagged 'UIImageView'
Very short snippet: the UIView to display an image
CaptureView: capture a UIView
o UIImageView ) in modo rapido. CaptureView allows you to clone, as an image, any view ( UIView or UIImageView ) quickly. (quindi visualizzato). What you get is an object CaptureView that can be used as a normal UIView (then displayed). Capturing the "screen", or any portion thereof, may be useful in many cases. Once the new "image", it can be manipulated without preoccparsi of its content.
Often you have multiple nested view and Carry out or processing effects on the mother's view that contains them all is not always an optimal solution.
Very short snippet: a series of images stored in NSUserDefaults
ai dati dell'immagine. To store an image in NSUserDefaults is sufficient to be able to get a pointer NSData image data. In this way we could rebuild our image at any time thereafter.
In the example shown below is used an array that contains a maximum of 4 images. Each new image is put on the head and the excess removed.
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:

Customize the sections in a UITableView Grouped
potremmo aver necessità di personalizzare la grafica dei titoli delle sezioni, come California o New York dell'esempio qui sotto. When we use a UITableView style Grouped we may need to customize the layout of section titles, such as California or New York the example below.

To do so, please use the following code, placing it in the delegate, ie in the class that responds to the protocol UITableViewDelegate :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | / / Returns View my custom, in this case an object / / Type UILabel UIView * ) tableView : ( UITableView * ) tableView - (UIView *) tableView: (UITableView *) tableView NSInteger ) section { viewForHeaderInSection: (NSInteger) section { [ [ [ UILabel alloc ] initWithFrame : CGRectZero ] autorelease ] ; UILabel * label = [[[UILabel alloc] initWithFrame: CGRectZero] autorelease]; UIFont boldSystemFontOfSize : 20 ] ; label.font = [UIFont boldSystemFontOfSize: 20]; label.textAlignment = UITextAlignmentCenter; UIColor blackColor ] ; label.shadowColor = [UIColor blackColor]; 1 , 1 ) ; label.shadowOffset CGSizeMake = (1, 1); "Sezione" ; // Sostituire con un array come al solito Label.Text @ = "Section", / / Replace with an array as usual UIColor whiteColor ] ; label.textColor = [UIColor whiteColor]; UIColor clearColor ] ; label.backgroundColor = [UIColor clearColor]; ; label.opaque = NO; return label; } / / We must also support this message does not work otherwise CGFloat ) tableView : ( UITableView * ) tableView - (CGFloat) tableView: (UITableView *) tableView NSInteger ) section { heightForHeaderInSection: (NSInteger) section { ; return 44; } |
It is also important to include heightForHeaderInSection , will not work.
Notes of interest
o UIImageView , ho utilizzato per inizializzare il frame CGRectZero che corrisponde a CGRectMake(0,0,0,0) . In the creation of our UILabel , which might also be wanting a more complex object like a UIView or UIImageView , I used to initialize the frame CGRectZero corresponding to CGRectMake(0,0,0,0) .
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.








Latest Comments
Simon : I tried last night putting everything into functions.php, okay, jquery forms, and tabs jQueryUI them ...
Giovambattista Fazioli : @ Simon: I recommend cleaning to enter a code like that in ...
Simon : @ Giovambattista Fazioli: Thank you for your patience, it's all clear ... now I feel now, ...
Giovambattista Fazioli : @ Simon is quite simple. Now I do not know if you need hand frontend, backend o. ..
Simon : Hello, sorry if you steal this space ... I'd need help if possible ... I need to ...