Tag: ipad

How to use UIPanGestureRecognizer to move object? iPhone/iPad

There are several examples of the UIPanGestureRecognizer class. For example I have read this and I am still not able to use it… On the nib file that I am working on I have a UIView (white rectangle on image) that I wish to drag with that class: and in my .m file I have […]

Landscape Mode ONLY for iPhone or iPad

I want to create an application that doesn’t use Portrait mode. I am not sure if I need to edit the plist or have code in addition to the plist

Generate a random number within range?

Possible Duplicate: Generating Random Numbers in Objective-C How do I generate a random number which is within a range?

Play sound on iPhone even in silent mode

I want to make an application which creates sound, music, or system sound when an iPhone is in silent mode. Is it possible to play any type of sound whether music or system tones when it is silent mode?

Play music in the background using AVAudioplayer

I want to play music even if the app goes in background. I checked all stackoverflow links but none of them worked. Please help need to do it today. I had used following code:- NSString *soundFilePath = [[NSBundle mainBundle] pathForResource:@”Day At The Beach” ofType: @”mp3″]; NSURL *fileURL = [[NSURL alloc] initFileURLWithPath: soundFilePath]; NSError *error; playerTemp […]

To ARC or not to ARC? What are the pros and cons?

I’ve yet to use ARC, since the majority of the code in the project I’m working on at the moment was written pre-iOS 5.0. I was just wondering, does the convenience of not retaining/releasing manually (and presumably more reliable code that comes as a result?) outweigh any ‘cost’ of using ARC? What are your experiences […]

Get Exif data from UIImage – UIImagePickerController

This question already has an answer here: UIImagePickerController and extracting EXIF data from existing photos 18 answers

Bold & Non-Bold Text In A Single UILabel?

How would it be possible to include both bold and non-bold text in a uiLabel? I’d rather not use a UIWebView.. I’ve also read this may be possible using NSAttributedString but I have no idea how to use that. Any ideas? Apple achieves this in several of their apps; Examples Screenshot: Thanks! – Dom

Proper way to exit iPhone application?

I am programming an iPhone app, and I need to force it to exit due to certain user actions. After cleaning up memory the app allocated, what’s the appropriate method to call to terminate the application?

How to make a application with target is iPhone/iPad

I want to make a application which can run complete in iPhone and iPad (full mode, not x2 mode). Please help me. Thank in advance! I found down a config called “Targeted Device Family”, but I still don’t know what about design (for iPhone, iPad), how to show UI if device is iPhone, how to […]