Graphics Reference
In-Depth Information
button2. center = CGPointMake ( 250 , 150 );
button2. alpha = 0.5 ;
[ self .containerView addSubview :button2];
//enable rasterization for the translucent button
button2. layer . shouldRasterize = YES ;
button2. layer . rasterizationScale = [ UIScreen mainScreen ]. scale ;
}
@end
Figure 4.21 The internal structure of the faded button is no longer visible.
Summary
This chapter explored some of the visual effects that you can apply programmatically to
layers, such as rounded corners, drop shadows, and masks. We also looked at scaling filters
and group opacity.
In Chapter 5, “Transforms,” we investigate layer transforms and transport our layers into
the third dimension.
 
Search WWH ::




Custom Search