i want to achieve like this image .
here is my view i want to reuse it for separator line
var sparteLine : UIView = {
var view = UIView()
view.backgroundColor = UIColor.blue // color blue for testing
view.translatesAutoresizingMaskIntoConstraints = false
return view
}()
i just try to do it by this way but it is not working .. it only showing last separator line . first one not showing . what can i do ?:
addSubview(sparteLine)
addSubview(disComment)
addSubview(disCommentTextField)
addSubview(sparteLine)
full source code here : https://gist.github.com/nazmulkp/c0b57185f76fb426634c65eb0476889e
thank you . if your need any information then let me know please :


sparteLineis global view variable so its overridding object value with last initiated object and thats why its taking last object and set only last object frame.disCommentview code ? how you are adding that view ?