uitableview - iOS Custom UITableViewCell Looks not all the same -


i use uiview's extension custome uitableviewcell display:

import uikit  private var materialkey = false private var _cornerradius = 3.0 private var _borderwidth = 0.0  extension uiview{  @ibinspectable var borderwidth:double{     get{         return _borderwidth     }      set{         _borderwidth = newvalue     } }  @ibinspectable var cornerradius:double{     get{         return _cornerradius     }      set{         _cornerradius = newvalue     } }  @ibinspectable var materialdesign:bool{     get{         return materialkey     }      set{         materialkey = newvalue         if materialkey{             self.layer.maskstobounds = false             self.layer.cornerradius = cgfloat(_cornerradius)             self.layer.shadowopacity = 0.8             self.layer.shadowradius = 5.0             self.layer.shadowoffset = cgsize(width: 0.0, height: 2.0)             self.layer.shadowcolor = uicolor(red: 157/255, green: 157/255, blue: 157/255, alpha: 1.0).cgcolor         }else{             layer.cornerradius = 0             layer.shadowopacity = 0             layer.shadowradius = 0             layer.shadowcolor = nil         }     } } 

but,when run app(whether real device or simulator),it‘s that:

enter image description here

the first cell , other not same :( can tell me why??? thank you!


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -