Skip to content
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

Music Player rotation #338

Merged
merged 16 commits into from
Aug 8, 2020
Merged

Conversation

ShresthPratapSingh
Copy link
Contributor

Description

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

Screenshots

@cpg
Copy link
Member

cpg commented Aug 2, 2020

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
Copy link
Member

cpg commented Aug 7, 2020

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

@ShresthPratapSingh
Copy link
Contributor Author

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

@ShresthPratapSingh
Copy link
Contributor Author

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

@cpg
Copy link
Member

cpg commented Aug 8, 2020

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 )>

@cpg cpg merged commit cc39a27 into amahi:beta Aug 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

music player does not follow the device orientation
2 participants