-
Notifications
You must be signed in to change notification settings - Fork 0
View
create a customView Subclass at first click File from Manu -> New -> File and flow downCode
import UIKit
@IBDesignable
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
https://azmalios.files.wordpress.com/2016/12/screen-shot-2016-12-01-at-7-42-53-am.png?w=604