THContactPicker icon indicating copy to clipboard operation
THContactPicker copied to clipboard

TextView view frame not changing with autoLayout

Open cloudjanak opened this issue 8 years ago • 3 comments

cloudjanak avatar Nov 18 '15 09:11 cloudjanak

Confirmed here. Anybody have any workarounds? Nothing I'm trying is working here either.

crrobinson14 avatar Nov 24 '15 23:11 crrobinson14

My best guess would be to call layoutSubviews on THContactPickerView

tristanhimmelman avatar Nov 25 '15 15:11 tristanhimmelman

Workaround which worked for me:

@IBOutlet weak var buddyPicker: THContactPickerView!
@IBOutlet weak var contactPickerHeight: NSLayoutConstraint!

func contactPickerDidResize(contactPicker: THContactPickerView!) {
    self.contactPickerHeight.constant = contactPicker.frame.height
    UIView.animateWithDuration(0.2) {
        self.view.layoutIfNeeded()
    }
}

romanzes avatar May 11 '16 12:05 romanzes