iphone

how does Pandora on iPhone get that UI?

Is there a way for an application to use the native iPod application (and put its own buttons and stuff on it)? How is that done? Or is it the case that Pandora, for example, has just coded up their interface to look almost exactly like the iPod application? In which case they would have had to, for example, re-create the volumen cont...

Keep playing sound with MPMoviePlayerController and locked screen?

Hey, you know when youre wathing a video with MPMoviePlayerController and the user presses the top button to lock the screen, the app goes to sleep, and so does the sound of the video, is there any way to prevent the lock from stoping the sound? If not, is there a way to intercept the lock, to create a "custom lock", to save some battery...

Alternative for print_r in php for iphone(objective-c)?

Hi there :) I've started with objective-c/iphone programming a couple of days ago, and still having some problems converting from other languages.. I'm currently testing around with NSArrays, and NSMutableArrays, and it's really annoying that I haven't found any method for effectively displaying the contents of my arrays (without creati...

change size of MPMoviePlayerController view

Hi, How to change size of MPMoviePlayerController views. Now it is covering full screen in landscape mode. Can we resize to half size or other size? I want display only half screen and other video related info display in remaining screen? Is it possible? ...

UIPickerView: Get row value while spinning?

I'd like to get the row value in real-time as the iPhone user spins a wheel in a UIPickerView (not just when the wheel settles onto a particular row). I looked into subclassing UIPickerView then overriding the mouseDown method, but I couldn't get this to work. Any suggestions would be very much appreciated. ...

[Album Count Issue] : addFilterPredicate PROBLEM with 3.1

I'm currently using the below code in one of my applications. It works great on a device running 3.0 but now always returns an Album count of 0 for each Playlist if the device is 3.1. Please let me know if I'm doing this incorrectly. I'm basically try to loop through the Playlists and count the number of Albums and Tracks for each one ...

Launching Safari in-app?

Is it possible to Launch Safari without having the app close? Just like the in-app email compose window. I'm aware of how to display a webpage in UIWebView. I'd like to use a full web browser, i.e. Safari. ...

how are these NSMutableArray initializations different?

In a branch of my code, I previously used this NSMutableArray *array1 = [[NSMutableArray alloc] init]; The above array is used populate a UITableVew. Just cause, I switched to the following: NSMutableArray *array1 = [NSMutableArray arrayWithCapacity:0] I made no other changes to my code) and my app crashes whenever I try to scrol...

UIWebView does not scale content to fit

I have a webview which is the top window in the hierarchy and has been declared as shown below. However, it does not scale pages to fit. Pages are top left aligned, but are not scaled, despite the scalesPageToFit property being set to YES. Any help would be greatly appreciated. webLookupView = [[UIWebView alloc] initWithFrame:CGRectMake...

Trying to use IBAction to load a ViewController that doesn't have a Nib file

I am trying without success to load PatientListTableViewController from a button on my first page. I have a tab bar item to get to this page already. However I want this same page accessed from a button on my start page because PatientListTableViewController is a tab item that is not seen on the tab bar when the user first opens the pag...

I would like to create a pin-code dialogue, like the one you can switch on to dial on the iPhone.

I am new to coding and would like to set this up in my app. How or where do you start this process... In you AppDelegate file? Please provide me a jump start. I'm invoking this process from the UIButtonTypeInfoDark on the NavgationBar/TabBar Controller from the MainWindow. I am basically trying to set up a 4 digit pin to protect the user...

Overlaying 2D paths on UIImage without scaling artifacts

I need to draw a path along the shape of an image in a way that it is always matching its position on the image independent of the image scale. Think of this like the hybrid view of Google Maps where streets names and roads are superimposed on top of the aerial pictures. Furthermore, this path will be drawn by the user's finger movement...

Count-Up Timer Required, iPhone Programming

Hi Guys, I am new to iPhone programming so am hoping someone can help me out here. I have searched the web, but can only find information on count down timers. What I am looking to do is start a count up timer when a button is pressed and then stop it when a certain value drops by, say 5, and finally display that time. I can display va...

Sharing Memory Between CGImageRef and UIImage

Is there any way to create a UIImage object from an offscreen surface without copying the underlying pixel data? I would like to do something like this: // These numbers are made up obviously... CGContextRef offscreenContext = MyCreateBitmapContext(width, height); // Draw into the offscreen buffer // Draw commands not relevant... // ...

UIButton with image losing its newly set image

I've got a UIButton (custom, with image) set up in IB which is an IBOutlet in my code. In my viewDidLoad method in the viewController, I am trying to change the existing image of the UIButton UIImage *newbuttonimage = [UIImage imageNamed:@"newbuttonimage.png"]; testbutton.imageView.image = newbuttonimage; OK, that works when starting...

stop sound in iPhone

SystemSoundID soundID; NSString *path = [[NSBundle mainBundle] pathForResource:@"static" ofType:@"caf"]; AudioServicesCreateSystemSoundID((CFURLRef)[NSURL fileURLWithPath:path], &soundID); AudioServicesPlaySystemSound(soundID); I have implemented above code in my application. It works perfectly, But the problem is I don't know how t...

iPhone - AVAudioPlayer - convert decibel level into percent

Hi developers, I like to update an existing iPhone application which is using AudioQueue for playing audio files. The levels (peakPowerForChannel, averagePowerForChannel) were linear form 0.0f to 1.0f. Now I like to use the simpler class AVAudioPlayer which works fine, the only issue is that the levels which are now in decibel, not li...

How does one put an image in each section of a table view?

Using the code below, how do I put an image in each section for this table view. switch (indexPath.section) { case TYPE_SECTION: // type -- should be selectable -> checkbox text = [patient.type valueForKey:@"name"]; cell.accessoryType = UITableViewCellAccessoryNone; cell.editingAccessoryT...

Should I compose a complex UIView with more UIView's or more CALayer's ?

I have a complex view which is composed of a base image overlaid with other images and 2D paths. I wonder what difference will it make if a assemble the complex view by creating a different UIView for each element and adding them as children of the complex view or if I should instead create a a different CALayer for each element and ad...

Why isn't -stringWithContentsOfURL returning my php echo?

My app accesses a simple php file on my server that does a simple echo "YES"; for testing purposes. I try to get the contents of the echo into an NSString object as below but my string is ALWAYS returning (null). Whats wrong? NSString *theString = [NSString stringWithContentsOfURL:aURLThatEchos]; NSLog(@"Value is: %@", theString); //...