ko1o / PYSearch

🔍 An elegant search controller which replaces the UISearchController for iOS (iPhone & iPad) .
MIT License
3.83k stars 752 forks source link

UISearchBar重复约束导致 push进入时键盘弹起后马上收起 #247

Closed JzwOnly closed 3 years ago

JzwOnly commented 3 years ago

Swift iOS13.5 进入页面键盘弹起后马上又收起,调用栈显示系统调用的resignFirstResponder image

约束问题

[LayoutConstraints] Unable to simultaneously satisfy constraints.
    Probably at least one of the constraints in the following list is one you don't want. 
    Try this: 
        (1) look at each constraint and try to figure out which you don't expect; 
        (2) find the code that added the unwanted constraint or constraints and fix it. 
    (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints) 
(
    <NSAutoresizingMaskLayoutConstraint:0x281df0320 h=--& v=--& UISearchBar:0x1170211e0.minX == 2   (active, names: '|':UIView:0x11701e130 )>,
    <NSLayoutConstraint:0x281d26f30 H:|-(0)-[UISearchBar:0x1170211e0](LTR)   (active, names: '|':UIView:0x11701e130 )>
)
GPX-NSlog commented 2 years ago

问题解决了吗