Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -(void)initTableView
- {
- //Aspecto
- [[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed:FONDO_BARRA_INICIAL] forBarMetrics:UIBarMetricsDefault];
- //Tabla
- self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
- [self.tableView setBackgroundView:nil];
- [self.tableView setBackgroundColor:RGB2UICOLOR(247.0f, 247.0f, 247.0f, 1.0f)];
- [self.tableView setSeparatorStyle:UITableViewCellSeparatorStyleSingleLine];
- [self.tableView setBounces:YES];
- CALayer *capa = [self.navigationController navigationBar].layer;
- [capa setShadowColor: [[UIColor blackColor] CGColor]];
- [capa setShadowOpacity:0.85f];
- [capa setShadowOffset: CGSizeMake(0.0f, 1.5f)];
- [capa setShadowRadius:2.0f];
- [capa setShouldRasterize:YES];
- //Redondeamos
- CGRect bounds = capa.bounds;
- bounds.size.height += 10.0f; //Para que pueda salir la sombra...
- UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:bounds
- byRoundingCorners:(UIRectCornerTopLeft | UIRectCornerTopRight)
- cornerRadii:CGSizeMake(10.0, 10.0)];
- // Create the shape layer and set its path
- CAShapeLayer *maskLayer = [CAShapeLayer layer];
- maskLayer.frame = bounds;
- maskLayer.path = maskPath.CGPath;
- // Set the newly created shape layer as the mask for the image view's layer
- [capa addSublayer:maskLayer];
- capa.mask = maskLayer;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement