self.imageView.layer.borderColor = [UIColor colorWithRed:0.9 green:0.9 blue:0.9 alpha:1].CGColor; self.imageView.layer.borderWidth = 1; self.imageView.layer.cornerRadius = 3.0; self.imageView.layer.masksToBounds = YES; self.imageView.layer.shouldRasterize = YES; self.imageView.layer.rasterizationScale = [UIScreen mainScreen].scale; self.imageViewBG.layer.shadowOffset = CGSizeMake(1, 1); self.imageViewBG.layer.shadowRadius = 1; self.imageViewBG.layer.shadowOpacity = 0.1; self.imageViewBG.layer.cornerRadius = 3.0; self.imageViewBG.layer.masksToBounds = NO; self.imageViewBG.layer.shouldRasterize = YES; self.imageViewBG.layer.rasterizationScale = [UIScreen mainScreen].scale; UIBezierPath *path = [UIBezierPath bezierPathWithRoundedRect:self.imageViewBG.bounds cornerRadius:3.0]; self.imageViewBG.layer.shadowPath = path.CGPath;
Monday, June 8, 2015
[iOS] Making fancy view with border, corner and shadow
Subscribe to:
Post Comments (Atom)
[ROM] Samsung S7 Stock Firmware BRI (Taiwan台灣)
Latest ROM: G930FXXU1DQEU Download: https://kfhost.net/tpl/firmwares.php?record=B7E6DE774E3811E7963AFA163EE8F90B Reference: http://...
-
In Android 4.1 (API 16) and above, MediaCodec is introduced by Android. By using MediaCodec, we can easily decode video without using Androi...
-
#include <sstream> #include <assert.h> // include in android platform-9 or newer #include <android/asset_manager.h> #inclu...
-
Latest ROM: G930FXXU1DQEU Download: https://kfhost.net/tpl/firmwares.php?record=B7E6DE774E3811E7963AFA163EE8F90B Reference: http://...
No comments:
Post a Comment