背影图

  UIView *view = [[UIView alloc]initWithFrame:CGRectMake(50, 200, 100, 100)];

    view.backgroundColor = [UIColor redColor];

    view.layer.shadowOpacity = 0.8;//阴影透明度,默认0

    view.layer.shadowOffset = CGSizeMake(10,10);

    view.layer.shadowColor = [UIColor greenColor].CGColor;

    view.layer.shadowRadius = 3;//阴影半径,默认3

    [self.view addSubview:view];

 

posted @ 2014-10-25 18:56  浪够L就回家  阅读(123)  评论(0编辑  收藏  举报