amahi / ios

Amahi iOS App
https://www.amahi.org/ios
GNU General Public License v3.0
43 stars 65 forks source link

Music Player rotation #338

Closed ShresthPratapSingh closed 4 years ago

ShresthPratapSingh commented 4 years ago

Description

This PR Fixes #319 (Music Player auto rotation).

Screenshots

cpg commented 4 years ago

I get debugger notices like this warning of issues (though I am not sure how related they are to this, but they happen during music play). Since it's related to PlayerQueueContainerView maybe we should investigate while we're at it

[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. 
(
    "<NSLayoutConstraint:0x28255d2c0 V:[UIView:0x12defb640]-(-552.96)-[AmahiAnywhere.PlayerQueueContainerView:0x12de5ed20]   (active)>",
    "<NSLayoutConstraint:0x28255d310 V:[UIView:0x12defb640]-(-65)-[AmahiAnywhere.PlayerQueueContainerView:0x12de5ed20]   (active)>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x28255d310 V:[UIView:0x12defb640]-(-65)-[AmahiAnywhere.PlayerQueueContainerView:0x12de5ed20]   (active)>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
cpg commented 4 years ago

can we clean this up and merge it soon @ShresthPratapSingh ?

ShresthPratapSingh commented 4 years ago

sure @cpg , I'm almost done fixing issue 335. Will clear this PR for merge ASAP.

ShresthPratapSingh commented 4 years ago

@cpg I've fixed the conflicting constraint logs. This PR is ready to be merged.

cpg commented 4 years ago

There are more, but I think they are probably related to other parts of the UI

The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKitCore/UIView.h> may also be helpful.
2020-08-08 13:16:52.249239+0200 AmahiAnywhere[11863:5065304] [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:0x280217430 h=--& v=--& UIKeyboardAssistantBar:0x10579b980.height == 0   (active)>",
    "<NSLayoutConstraint:0x280270870 V:|-(0)-[_UIButtonBarStackView:0x10579c6b0]   (active, names: '|':UIKeyboardAssistantBar:0x10579b980 )>",
    "<NSLayoutConstraint:0x2802707d0 V:[_UIButtonBarStackView:0x10579c6b0]-(0)-|   (active, names: '|':UIKeyboardAssistantBar:0x10579b980 )>",
    "<NSLayoutConstraint:0x280216530 'UIButtonBar.maximumAlignmentSize' UIView:0x10579cd10.height == UILayoutGuide:0x28184fc60'UIViewLayoutMarginsGuide'.height   (active)>",
    "<NSLayoutConstraint:0x28020f610 'UIView-bottomMargin-guide-constraint' V:[UILayoutGuide:0x28184fc60'UIViewLayoutMarginsGuide']-(9)-|   (active, names: '|':_UIButtonBarStackView:0x10579c6b0 )>",
    "<NSLayoutConstraint:0x28020f570 'UIView-topMargin-guide-constraint' V:|-(10)-[UILayoutGuide:0x28184fc60'UIViewLayoutMarginsGuide']   (active, names: '|':_UIButtonBarStackView:0x10579c6b0 )>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x28020f610 'UIView-bottomMargin-guide-constraint' V:[UILayoutGuide:0x28184fc60'UIViewLayoutMarginsGuide']-(9)-|   (active, names: '|':_UIButtonBarStackView:0x10579c6b0 )>