iphone

iPhone Core Data does not fetch any data from Sqlite3

I copied a filled, existing sqlite3-file to my project; it is found (I check that with - (void)createEditableCopyOfDatabaseIfNeeded { NSLog(@"Checking if we have to create editable copy of database"); // First, test for existence. BOOL success; NSFileManager *fileManager = [NSFileManager defaultManager]; NSError *er...

iPhone - An instance of class ... is being deallocated while key value observing are still registered with it

Hello! I have a ViewController (with a MKMapView) which is pushed into, because of the NavigationController. So I have a NavBar with a "back" button. Clicking that back-button, I get an error: 2010-01-11 18:05:35.273 TestApp[147:207] An instance 0x1758f0 of class MKUserLocation is being deallocated while key value observers are stil...

Open video in iPhone without controls

I am trying to play video without showing controls (volume and other buttons) but it also should be possible to make them visible by taping on the video. The code is: theMovie.scalingMode = MPMovieScalingModeAspectFill; theMovie.movieControlMode = MPMovieControlModeDefault; In this case it shows the controls by default a...

CLLocationManager and degrees of heading in iPhone

Using the CLLocationManager object's didUpdateHeading event, how do I convert the resulting heading.x and heading.y values into degrees I can plot onto an image of a compass? ...

UIImage iPhone Rotate 37.8 degrees

After I load an image from the device, I need to rotate it 37.8 degrees then display it on a View. Is there an function in Objective-C that can do the image rotation? Ian ...

How to add the % symbol directly after a variable call in Obj C?

I have a program that calculates some user input, and I would like to show it as a percent. I just need to know how to put the '%' symbol in my code without it crashing on me. Using, lblUserTypedName.text = [[NSString alloc] initWithFormat: @"%2.1f", ultimate_risk]; Prints out a number, like 18.4. I would like for it to print out 18....

Adding sections to a plist for Xcode for use in Cocoa touch Table View

I am a beginning iPhone SDK programmer. I built a simple practice application I am trying to use to learn more about table views. It's an app that loads football teams from a plist and displays them in a table view with their stadium name and logo. Tapping the team goes to a detail view for that team. I am trying to understand how to...

Displaying a UITableView followed by an image, followed by more UITableViewCells

I've seen some applications on the iPhone have an image on top of the tableView, which is straight forward and can be set with something like tableViewHeader.. and a picture below set with tableViewFooter. I recently seen an application where there is an image in the header, a table view, then another image below the footer, and then sub...

How does GLPaint work

Ok completely OpenGL-ES noob question. If anyone could explain how apple does GLPaint or better yet the VERY BASIC code of how they accomplished that, I would be thrilled. I am honestly not trying to ask for you to write my program, but trying to understand the basics of how apple accomplished the GLPaint drawing feature. P.S: I don't...

What is the best way to create a shadow behind a UIImageView

I have a UIImageView that I want to add a shadow behind. I wish that apple had that as a property but they have to make lots of things hard for us programmers so I need to ask this question. ...

Learning to write custom iPhone UI

My question is more towards learning the UI skillset for iPhone dev. I have been noticing a lot of iPhone developers who build great iPhone application, and when I say great I mean the awesome interfaces. I want to be able to create similar interfaces but I am finding it hard to learn how to do that. I have picked up a few iPhone dev ...

iphone map fold button in new map app

Hello, does anyone know what is the name of the button in the right corner of the toolbar in the new Maps application? It's the button that unfolds the map and the view underneath offers buttons to switch between map modes. I would like to use it in my map application if it's a part of the SDK! ...

Can't set a custom backgroundColor with an if-query in applicationDidFinishLaunching

Hello, my program normally has a standard background: "black.jpg". In the applicationDidFinishLaunching I did the following: [window addSubview:viewController.view]; [window makeKeyAndVisible]; viewController.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"black.jpg"]]; and I have a nice black back...

Autoscroll a UITableView

I have implemented a UITableView, which shows up fine as a subview in my iPhoneApp. Now this is supposed to be something similar to a tele prompter, so I would like to autoscroll this thing up, till the last cell is there. I was playing around with -scrollToRowVisible, but this did not seem to work. Can anyone give me a hint here or poi...

remove all objects from a uiview?

I have a UIview which I am drawing a series of buttons on to. I want to change these buttons depending on a selection the user makes. This is working nicely... but I cannot remove the buttons which were already there. It's a UIScrollView with a view added as a subview. It's the subview which I need to basically "clear" / wipe clean. In ...

Best encoding specifications for ondemand video on iPhone

Hello all, My application plays ondemand streaming videos which is h264 and aac on iPhone OS 2.2.1+ / 3.1.2 I would like to know best settings for the encoder. What H264 Profile ? AAC v1 or V2 ? Max bitrate. Thanks for your advice guys. Thierry ...

Math Libraries for iPhone

Not wanting to re-invent the wheel, are there any open-source (or included) math libraries in Objective-C (for iPhone) that can calculate Internal Rate of Return (IRR) or Modified Internal Rate of Return (MIRR)? I'd hate to have to re-do all that work if someone out there has already done it. Thanks! ...

Memoization in static Objective-C class

Say I have a class method like + (double)function:(id)param1 :(id)param2 { // I want to memoize this like... static NSMutableDictionary* cache = nil; // // test if (param1,param2) is in cache and return cached value, etc. etc // } Thanks!! ...

Best way to handle multiple UITableViews in one UIViewController?

I have a UIViewController that should be capable of displaying tableViews with multiple data sources. The UITableView spans about half the size of the screen, and there is and up and down button that allows you to go through different data. Everytime the up and down button is hit, I'd like to ultimately use UIViewAnimationTransitionCurlD...

Facebook friend-selector dialog in iphone

Hi, is there a way to have my iphone native app display the friend-selector dialog of facebook? Or do i have to manually retrieve the user's friends and create the dialogs myself? Thanks ...