-
Notifications
You must be signed in to change notification settings - Fork 49
Description
Hi,
In setupToolItems(), would you consider to set leftToolItem.heightAnchor.constraint in as the same as rightToolItem.heightAnchor.constraint?
Original:
if leftToolStyle?(leftToolItem) ?? false{
baseView.addSubview(leftToolItem)
leftToolItem.topAnchor.constraint(equalTo: baseView.topAnchor, constant: spacing2).isActive = true
leftToolItem.leftAnchor.constraint(equalTo: baseView.leftAnchor,constant: spacing2).isActive = true
leftToolItem.widthAnchor.constraint(equalTo: leftToolItem.heightAnchor).isActive = true
leftToolItem.addTarget(self, action: #selector(AZDialogViewController.handleLeftTool(:)), for: .touchUpInside)
}
How about?
if leftToolStyle?(leftToolItem) ?? false{
baseView.addSubview(leftToolItem)
leftToolItem.topAnchor.constraint(equalTo: baseView.topAnchor, constant: spacing2).isActive = true
leftToolItem.leftAnchor.constraint(equalTo: baseView.leftAnchor,constant: spacing2).isActive = true
leftToolItem.widthAnchor.constraint(equalTo: leftToolItem.heightAnchor).isActive = true
leftToolItem.heightAnchor.constraint(equalToConstant: 20).isActive = true
leftToolItem.addTarget(self, action: #selector(AZDialogViewController.handleLeftTool(:)), for: .touchUpInside)
}
Thank you very much for the sharing!
Regards,
godustin