2012-07-24 4 views

답변

0

사용자 인터페이스와 사용자 코드 모두에서 UILabel 개체를 UITextField로 변경하고 동일한 방식으로 연결하십시오. 해당 필드의 텍스트를 편집 할 수 있습니다.

또한 사용자가 (위임 설정을 통해) 변경하고 위임 구현의 데이터를 수락하도록 모델을 설정할 때 viewController를 가져와야 만 가져올 수 있습니다.

행운을 비네. 그것을위한 포드있다

0

:

self.detailTextLabel?.isHidden = true 
    self.contentView.viewWithTag(3)?.removeFromSuperview() 
    self.textField.tag = 3 
    self.textField.translatesAutoresizingMaskIntoConstraints = false 
    self.contentView.addSubview(self.textField) 
    self.addConstraint(NSLayoutConstraint(item: self.textField, attribute: .leading, relatedBy: .equal, toItem: self.contentView, attribute: .leading, multiplier: 1, constant: 50)) 
    self.addConstraint(NSLayoutConstraint(item: self.textField, attribute: .top, relatedBy: .equal, toItem: self.contentView, attribute: .top, multiplier: 1, constant: 8)) 
    self.addConstraint(NSLayoutConstraint(item: self.textField, attribute: .bottom, relatedBy: .equal, toItem: self.contentView, attribute: .bottom, multiplier: 1, constant: -8)) 
    self.addConstraint(NSLayoutConstraint(item: self.textField, attribute: .trailing, relatedBy: .equal, toItem: self.contentView, attribute: .trailing, multiplier: 1, constant: -16)) 
    self.textField.textAlignment = .right 
: 여기 https://github.com/fulldecent/FDTextFieldTableViewCell

은 관련 코드입니다

관련 문제