iphone Programming Glossary: setmaskstobounds
Rounded Corners on UIImage http://stackoverflow.com/questions/205431/rounded-corners-on-uiimage UIImageView alloc initWithImage UIImage imageNamed @ wood.jpg Get the Layer of any view CALayer l roundedView layer l setMasksToBounds YES l setCornerRadius 10.0 You can even add a border l setBorderWidth 4.0 l setBorderColor UIColor blueColor CGColor share..
Rounded UIView using CALayers - only some corners - How? http://stackoverflow.com/questions/2264083/rounded-uiview-using-calayers-only-some-corners-how UIImage imageWithData NSData dataWithContentsOfURL NSURL URLWithString @ any Url Here CALayer l imgVUserImg layer l setMasksToBounds YES l setCornerRadius 5.0 l setBorderWidth 2.0 l setBorderColor UIColor darkGrayColor CGColor Above code is applying the..
How to fill a path with gradient in drawRect:? http://stackoverflow.com/questions/2985359/how-to-fill-a-path-with-gradient-in-drawrect gradient setColors NSArray arrayWithObjects id UIColor blueColor CGColor id UIColor whiteColor CGColor nil self layer setMasksToBounds YES self layer insertSublayer gradient atIndex 0 However this paints the entire view that this is in with the gradient covering..
Can't add a corner radius and a shadow http://stackoverflow.com/questions/3316424/cant-add-a-corner-radius-and-a-shadow 3.0f layer setShouldRasterize YES Here layer is a CALayer of a UIView subclass. So this works whenever I set layer setMasksToBounds NO Now to add a corner radius I do this layer setCornerRadius 7.0f but I need to set MasksToBounds to YES in order for this.. radius I do this layer setCornerRadius 7.0f but I need to set MasksToBounds to YES in order for this to work layer setMasksToBounds YES Is there anyway I can get both of these effects to add Thanks for your time Denis iphone objective c core animation..
UIButton color issues http://stackoverflow.com/questions/4909637/uibutton-color-issues current code UIButton b1 UIButton alloc init b1.frame CGRectMake 280 395 30 30 b1 layer setCornerRadius 8.0f b1 layer setMasksToBounds YES b1 layer setBorderWidth 1.0f b1 layer setBackgroundColor botCol CGColor b1.titleLabel.font UIFont boldSystemFontOfSize..
How to set round corners in UI images in iphone http://stackoverflow.com/questions/5752667/how-to-set-round-corners-in-ui-images-in-iphone
How to crop UIImage on oval shape or circle shape? http://stackoverflow.com/questions/6530573/how-to-crop-uiimage-on-oval-shape-or-circle-shape
UIBarButtonItem with color? http://stackoverflow.com/questions/664930/uibarbuttonitem-with-color button.titleLabel.font UIFont fontWithName @ Helvetica Bold size 12.0f button.layer setCornerRadius 4.0f button.layer setMasksToBounds YES button.layer setBorderWidth 1.0f button.layer setBorderColor UIColor grayColor CGColor button.frame CGRectMake 0.0 100.0..
Avfoundation - Play and record video (along with audio and preview) simultaneously http://stackoverflow.com/questions/6991452/avfoundation-play-and-record-video-along-with-audio-and-preview-simultaneous session self.captureVideoPreviewLayer previewLayer UIView view self cameraView CALayer viewLayer view layer viewLayer setMasksToBounds YES CGRect bounds view bounds captureVideoPreviewLayer setFrame bounds if captureVideoPreviewLayer isOrientationSupported..
cellForRowAtIndexPath memory management http://stackoverflow.com/questions/8859735/cellforrowatindexpath-memory-management objectAtIndex indexPath.row objectAtIndex imageIndex imageView.frame CGRectMake 8 9 44 44 imageView.layer setMasksToBounds YES imageView.layer setCornerRadius 3.0 cell contentView addSubview imageView imageView release label release return cell.. imageView UIImageView alloc init imageView.frame CGRectMake 8 9 44 44 imageView.tag imageTag imageView.layer setMasksToBounds YES imageView.layer setCornerRadius 3.0 cell contentView addSubview imageView imageView release NSInteger artistIndex 1..
|