-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changing tokenView's frame #10
Comments
The Also the cell should be set up in |
I tried to change frame of
However it did not work. Can you please provide a simple snippet of subclassing |
As I said you must change the constraints. Haven't tested it but something like this: class CustomCell<T, CollectionViewCell: UICollectionViewCell>: CollectionTokenCell<T, CollectionViewCell> where CollectionViewCell: EurekaTokenCollectionViewCell, CollectionViewCell.T == T {
required public init(style: UITableViewCellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
}
required public init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
override func setupConstraints() {
// add custom constraints
// like
// let views = ["tokenView": tokenView]
// contentView.addConstraints(NSLayoutConstraint.constraints(withVisualFormat: "H:|[tokenView]|", options: .alignAllLastBaseline, metrics: nil, views: views))
// contentView.addConstraints(NSLayoutConstraint.constraints(withVisualFormat: "V:|[tokenView]|", options: .alignAllLastBaseline, metrics: nil, views: views))
}
}
final class CustomAccessoryRow<T: TokenSearchable>: _TokenRow<T, CustomCell<T, TRCollectionViewCell<T>>>, RowType {
required init(tag: String?) {
super.init(tag: tag)
}
} |
Ok! Last question, what about changing the fonts and sizes of placeholder and tokens? |
I want to change
tokenView
's frame in.cellSetup
androw
's constructor by setting$0.cell.tokenView.frame
. However neither of them worked. Can you help?The text was updated successfully, but these errors were encountered: