Skip to content
This repository has been archived by the owner on Jun 13, 2019. It is now read-only.

Commit

Permalink
Make playback buttons layout better, always play song
Browse files Browse the repository at this point in the history
  • Loading branch information
aydenp committed Jun 3, 2017
1 parent 833e7a0 commit b198451
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions README.md
Expand Up @@ -6,6 +6,10 @@ Bring the iOS 9 Music app to iOS 10.

I had originally planned to release and finish this tweak myself, but was unable to because of stress from school and other things. To benefit the community, I have released it as open-source here, with the hopes that others can bring it to completion.

## Not a developer?

[Get Melody from my repo](https://repo.applebetas.co/depiction/co.dynastic.ios.tweak.melody/)

## Contributing

**If you plan on contributing, you must read the license carefully.**
Expand Down
8 changes: 4 additions & 4 deletions Tweak.xm
Expand Up @@ -1278,8 +1278,8 @@ static void handleUnplayableEntityValueContext(MusicEntityValueContext *entityVa
if(playButton == nil) {
playButton = [[%c(MusicPlayButton) alloc] init];
[playButton showPlayIndicator:YES];
[playButton addTarget:self action:@selector(_playButtonTapped:) forControlEvents:0x40];
[playButton setBigHitInsets:UIEdgeInsetsMake(-15, -15, -15, -15)];
[playButton addTarget:self action:@selector(_playButtonTapped:) forControlEvents:UIControlEventTouchUpInside];
[playButton setBigHitInsets:UIEdgeInsetsMake(15, 15, 15, 15)];
[self _configurePlayButtonVisualProperties:playButton];
[self addSubview:playButton];
//[playButton _applyPlaybackStatus:_playbackStatus];
Expand All @@ -1293,7 +1293,7 @@ static void handleUnplayableEntityValueContext(MusicEntityValueContext *entityVa

%new
-(void)_playButtonTapped:(id)arg1 {
int action = 0x0;//_MusicPlayButtonActionForPlaybackStatus(self->_playbackStatus);
int action = 0x3;// play song until we figure out: _MusicPlayButtonActionForPlaybackStatus(self->_playbackStatus);
if(action != 0x0) [self _handlePlayButtonTappedWithAction:action];
}

Expand Down Expand Up @@ -1323,7 +1323,7 @@ static void handleUnplayableEntityValueContext(MusicEntityValueContext *entityVa
edgeInsets.right += artworkDescriptor.artworkEdgeInsets.right;
}
CGRect playButtonFrame = UIEdgeInsetsInsetRect([self _artworkView].frame, edgeInsets);
[playButton setFrame:CGRectMake(CGRectGetMaxX(playButtonFrame), CGRectGetMaxY(playButtonFramegi), playButton.frame.size.width, playButton.frame.size.height)];
[playButton setFrame:CGRectMake(CGRectGetMaxX(playButtonFrame), CGRectGetMaxY(playButtonFrame), playButton.buttonSize.width, playButton.buttonSize.height)];
}];
}

Expand Down

0 comments on commit b198451

Please sign in to comment.