Tag Archives: View


create a customView Subclass at first
click File from Manu -> New -> File
and flow downCode

import UIKit


class customView: UIView {

  override func draw(_ rect: CGRect) {  

// indicate for borderline

    layer.borderWidth = 10.0


put view by dragging from object library, 
select view and works in pin.
put 20 spacing to nearest neighbor.
unselect constraint to margins
in update frames select items of new constraints.
add 4 constraints

note : if you find some red color  view
resolve auto layout issues
click -> all views in view controller -> Update Frames
Note: if find something wrong 
click -> all views in view controller -> Clear Constraints

in Identity inspector, class change to customView
Note : if you can change anything
click -> product from manu -> Clean 
again click -> product -> build