How to NSLog an MPMediaItem ?
Or how to convert an MPMediaItem into an NSDictionary ? That’s pretty easy :
Or how to convert an MPMediaItem into an NSDictionary ? That’s pretty easy :
Do you want to present by yourself the list of available medias in the user iPod Library instead of having the MediaPickerController doing that ? Here is the good code for you 🙂
You can create a static method like this: + (NSDate *)SQLDateTimeToNSDate:(NSString *)textDate { NSDateFormatter *dateFormater = [[NSDateFormatter alloc] init]; [dateFormater setDateFormat:@"yyyy-MM-dd HH:mm:ss"]; NSDate *date = [[NSDate alloc] init]; date = [dateFormater dateFromString:textDate]; [dateFormater release]; return date; }
Vous pouvez créer une méthode statique comme celle là : + (NSDate *)SQLDateTimeToNSDate:(NSString *)textDate { NSDateFormatter *dateFormater = [[NSDateFormatter alloc] init]; [dateFormater setDateFormat:@"yyyy-MM-dd HH:mm:ss"]; NSDate *date = [[NSDate alloc] init]; date = [dateFormater dateFromString:textDate]; [dateFormater release]; return date; }
Si votre NSDictionary (ou NSMutableDictionary) s'appelle "myDictionary", utilisez : if ([myDictionary count]==0) { ... }
If your NSDictionary (or NSMutableDictionary) is named "myDictionary", just use : if ([myDictionary count]==0) { ... }
Following is the list of the font names & family really available on an iPhone :
Basic question, and sometimes we’re thinking of non « basic » answer because as a beginner, we’re not comfortable enough on using all magical stuff from objective-C/Cocoa… Well, in reality, we can let Quartz do that by itself 😀
Le débuggage d’une application sous xCode peut parfois s’avérer assez « bizarre ». Je suis sûr qu’il vous est déjà arrivé d’être sûr d’avoir respecté les techniques de gestion de la mémoire en objective-c et pourtant votre application se termine avec un « EXC_BAD_ACCESS ».
Some beginners may have difficulties to insert into their SQL queries quotes like in « WPTechnology’s articles »…