lundi 29 décembre 2014

outer shadow effect to textfield in iOS

while i am trying to implement a round edge to textfield at login screen to my application when i gave shadow effect to it using Quartzcore framework, white rectangular edges comes to the front.enter image description here


Ihave written below code in viewDidLoad in viewcontroller.m file :-



txt_PhoneNo.layer.cornerRadius = 14;
txt_PhoneNo.layer.borderColor = [[UIColor grayColor] CGColor];
[txt_PhoneNo.layer setBorderWidth:1.0];
txt_PhoneNo.layer.shadowColor = [UIColor grayColor].CGColor;
txt_PhoneNo.layer.shadowOffset = CGSizeMake(4.0f,4.0f);
txt_PhoneNo.layer.masksToBounds = NO;
txt_PhoneNo.layer.shadowRadius = 4.0f;
txt_PhoneNo.layer.shadowOpacity = 1.0;


How to remove these white edges from my textfield? I am new to iOS development.Any help would be greatly appreciated.




Aucun commentaire:

Enregistrer un commentaire