iOS 11 适配工具栏(UIToolbar)

在iOS11中,ToolBar 里面的按钮的矩形可触模区域非常小,紧贴着图片,所有有时候点着没反应

在 UIButton 创建的时候,同时加一句这样的代码:

  [[button.widthAnchor constraintEqualToConstant:@"button的宽"] setActive:YES];

原文地址:https://www.cnblogs.com/MJP334414/p/7596902.html