Hello. Like the title says i am trying to creating a TextView. It is supposed to be in a UIView which already contains another UIView which poses as a fake top border. The border is where it is supposed to be, but the TextView won't show. Does anybody what i am doing wrong? Here is the code:
Code Block swift let jobView = UIView.init(frame:CGRect.zero) let topBorder = UIView.init(frame:CGRect.zero) let jobTitleText = UITextView.init(frame:CGRect.zero) jobView.translatesAutoresizingMaskIntoConstraints = false topBorder.translatesAutoresizingMaskIntoConstraints = false jobTitleText.translatesAutoresizingMaskIntoConstraints = false jobTitleText.text = job.title jobTitleText.textColor = UIColor.black jobTitleText.font = UIFont.boldSystemFont(ofSize: 20) jobView.addSubview(topBorder) jobView.addSubview(jobTitleText) NSLayoutConstraint.activate([ topBorder.topAnchor.constraint(equalTo: jobView.topAnchor), topBorder.centerXAnchor.constraint(equalTo: jobView.centerXAnchor), topBorder.heightAnchor.constraint(equalToConstant: 15.0), topBorder.widthAnchor.constraint(equalTo: jobView.widthAnchor) ]) NSLayoutConstraint.activate([ jobTitleText.topAnchor.constraint(equalTo: topBorder.bottomAnchor, constant: +5.0), jobTitleText.heightAnchor.constraint(equalToConstant:25.0), jobTitleText.leadingAnchor.constraint(equalTo: jobView.leadingAnchor, constant: +5),