jaminguy / jgmediapicker Goto Github PK
View Code? Open in Web Editor NEWA replacement for the MPMediaPickerController class for iOS that works more like the Music app
A replacement for the MPMediaPickerController class for iOS that works more like the Music app
For some artists, the list of albums is empty. However if you browse by album, you will find them.
Is there a way to only show songs that are one the device? Right now it shows everything in the iCloud library I believe.
It's weird, but if you include this library into a project, then in a viewcontroller, call the Apple MPMediaPickerController, pressing the albums tab in the standard MPMediaPickerController will cause a crash.
This happens even if in the viewcontroller code, no JGMediaPicker controller header or code is included. It seems that just including the source and resources will cause a problem with Apple's MPMediaPickerController.
If the track number is 0, I use the row index. I thing Apple does it too.
(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"AlbumTrackCell";
JGAlbumTrackTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
[[NSBundle mainBundle] loadNibNamed:@"JGAlbumTrackTableViewCell" owner:self options:nil];
cell = self.albumTrackTableViewCell;
self.albumTrackTableViewCell = nil;
}
MPMediaItem *mediaItem = [[[self albumCollection] items] objectAtIndex:indexPath.row];
NSNumber * trackNumber = [mediaItem trackNumber];
if(!trackNumber || ![trackNumber intValue])
trackNumber = [NSNumber numberWithInt:indexPath.row+1];
cell.trackNumberLabel.text = [NSString stringWithFormat:@"%d",[trackNumber intValue]];
cell.trackNameLabel.text = [mediaItem title];
cell.trackLengthLabel.text = [mediaItem trackLengthString];
//make odd rows gray
cell.backgroundView.backgroundColor = indexPath.row % 2 != 0 ? kGrayBackgroundColor : [UIColor whiteColor];
return cell;
}
Hi,
I tried to run the JGMediaPicker demo on iOS7 and it seems that the tab icons are somehow messed up when the tab bar is shown for the first time.
When clicking a tab bar item, said icon will "jump" into the right position and after successive clicking of all icons the tab bar will look fine:
Any idea what is causing this?
I tried fixing this but miserably failed so far. The most promising explanation I found on the web is http://stackoverflow.com/questions/19819587/misaligned-bottom-tab-icons-ios7 but also this didn't fix the issue.
Any help would be much appreciated.
Best regards,
Marcel
A 5th tab displaying More should be added similar to the Music app.
The root view controllers need search bars added to the top like the Music app.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.