mpmediapickercontroller

Picking a song and play from Music app library - Swift 2.0

自作多情 提交于 2020-06-11 08:05:50
问题 I just took a basic Swift 2.0 course. I am trying to make an app to select a song from iOS's Music app library and play it. I came across this link which shows how to make media item picker. import UIKit import MediaPlayer class ViewController: UIViewController { @IBOutlet weak var pickSong: UIButton! override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. let mediaPicker = MPMediaPickerController(mediaTypes: .Music) //

MPMediaPickerController customize the colors of the labels and icons

筅森魡賤 提交于 2020-01-16 01:05:12
问题 I need change the labels colors of MPMediaPickerController item, on iOS 7 , im using Xcode5 , what can i do?. My code of the creation of MPMediaPickerController is: - (IBAction)addSongs:(id)sender { MPMediaPickerController *picker = [[MPMediaPickerController alloc] initWithMediaTypes:MPMediaTypeMusic]; picker.delegate = self; picker.allowsPickingMultipleItems = YES; } I was trying with this but not works: https://gist.github.com/acidlemon/1955332 Examples: Thanks in advance. 回答1: Change your

MPMediaPickerController customize the colors of the labels and icons

南笙酒味 提交于 2020-01-16 01:05:07
问题 I need change the labels colors of MPMediaPickerController item, on iOS 7 , im using Xcode5 , what can i do?. My code of the creation of MPMediaPickerController is: - (IBAction)addSongs:(id)sender { MPMediaPickerController *picker = [[MPMediaPickerController alloc] initWithMediaTypes:MPMediaTypeMusic]; picker.delegate = self; picker.allowsPickingMultipleItems = YES; } I was trying with this but not works: https://gist.github.com/acidlemon/1955332 Examples: Thanks in advance. 回答1: Change your

Runtime error when using MPMediaPickerController in iOS Simulator

核能气质少年 提交于 2020-01-12 04:38:32
问题 The following happens when I try to run an app using the MPMediaPickerController on the iOS Simulator. 2012-05-28 22:26:42.416 My App[48426:11f03] Could not load source: 3 2012-05-28 22:26:42.418 My App[48426:11f03] *** Assertion failure in -[MPMediaPickerController loadView], /SourceCache/MediaPlayer_Sim/MobileMusicPlayer-1391.72/SDK/MPMediaPickerController.m:86 2012-05-28 22:26:42.419 My App[48426:11f03] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException',

Create a gallery for local app content in iOS

旧时模样 提交于 2020-01-06 19:33:51
问题 My app takes some videos and pictures and stores them in the Application Home/Documents folder. I want to create a gallery that will open and display (and playback) these items. I looked into MPMediaPickerController and it looks like the only option for data source there is the Photos Album. It looks like I will have to go with creating UICollectionView. Is this the right way to do this or is there another way similar to MPMediaPickerController but with setting the source to an array of data

In swift, is there a way to have UIView class also be MPMediaPickerControllerDelegate?

╄→гoц情女王★ 提交于 2019-12-25 03:53:42
问题 I am currently trying to make a music app using swift. This is my first app (not counting a couple tutorial things). I've been looking at some sample code, including Apple's addMusic example, and I have had issues with the following translation of the objective c code into swift: class ViewController: UIViewController <MPMediaPickerControllerDelegate> { I get the error "Cannot specialize non-generic type 'UIViewController'. Is there a way to do this that I am missing or will I need to define

implement alphabetical scroll in MPMediaPickerController app

一世执手 提交于 2019-12-24 02:26:11
问题 If you go to the iphone library and then go to songs, you will see the songs being displayed in a similar way to the MPMediaItemPicker class does. The only difference is that the ipod application shows the search bar right at the top of the list and also a nice alphabetical scroll on the right hand side whereas the MPMediaItemPicker class only isplays a simple scroll going up and down. How can i implement an alphabetical scroll on the right in the MPMediaItemPicker class? Can someone please

implement alphabetical scroll in MPMediaPickerController app

旧时模样 提交于 2019-12-24 02:26:08
问题 If you go to the iphone library and then go to songs, you will see the songs being displayed in a similar way to the MPMediaItemPicker class does. The only difference is that the ipod application shows the search bar right at the top of the list and also a nice alphabetical scroll on the right hand side whereas the MPMediaItemPicker class only isplays a simple scroll going up and down. How can i implement an alphabetical scroll on the right in the MPMediaItemPicker class? Can someone please

MPMediaPickerController orientation on iPad

不羁岁月 提交于 2019-12-22 05:15:44
问题 How can I set correct orientation of MPMediaPickerController ? I've return YES in shouldAutorotateToInterfaceOrientation, but i have bad frame for Landscape (if show MPMediaPickerController in Portrait first, and conversely). I've rotating my device chaotically and sometime frame set to correct himself! I've find the method to set frame by rotating - need rotate to 180 degreess. For example, if you have good frame in Portrait, when you rotate to Landscape - you have bad frame (from Portatait)

Get audio file size without export

早过忘川 提交于 2019-12-21 17:22:39
问题 i'm developing an app that export audio file stored in the iPod library, but i should verify the file size before export and upload (server has a fixed max upload size): i know that after exporting file, the size will not be the same: is there any method to estimate the new size ? main question : can i know the original file size before export (using MPMediaItem or something else), so i can tell user that this file can't be uploaded (the export can take a while). thanks. 回答1: I have not