Skip to main content

Set shadow for UIView on 4 side (top,right,bottom and left)

UIView *rateVW=[[UIView alloc] initWithFrame:CGRectMake(+25, [[UIScreen mainScreen] bounds].size.height/4-30, [[UIScreen mainScreen] bounds].size.width-50,  [[UIScreen mainScreen] bounds].size.height/2)];
    rateVW.layer.cornerRadius=5;
    rateVW.backgroundColor=[UIColor whiteColor];
    
    rateVW.layer.shadowColor = [UIColor blackColor].CGColor;
    rateVW.layer.shadowOpacity = 0.7;
    rateVW.layer.shadowOffset = CGSizeZero;
    rateVW.layer.shadowRadius = 4;
    rateVW.layer.shadowPath = [UIBezierPath bezierPathWithRect:rateVW.bounds].CGPath;

    [backView2 addSubview:rateVW];

Enjoy Coding...!

Comments

Popular posts from this blog

Call phone Number In swift 3

//Here you can make method of calling functionality. func callNumber (yourP honeNumber : String ) { if let phoneCallURL = URL ( string : "tel://\(yourP honeNumber )" ) { let application : UIApplication = UIApplication . shared if ( application . canOpenURL ( phoneCallURL )) { application . open ( phoneCallURL , options : [:], completionHandler : nil ) } } } Happy Coding :)

Create ActionSheet and AlertView in swift 3

let  alertVC:  UIAlertController  = UIAlertController (title:  "Alert" , message:  "YOUR MESSAGE" , preferredStyle: .actiobSheet)    let  okBtn = UIAlertAction. init (title:  "Ok" , style: . default , handler: {  _   in                           // Perform whatever you want                          })     alertVC.addAction(okBtn)     self .present(alertVC, animated:  true , completion:  nil )