iphone

How do I update a MapView with an address?

I want to update a MapView in an iPhone app. Using a geocordinate, this is trivial. But what if I don't know the coordinate? I want to update it using an address string, like you would enter in the text box of google maps. To give a little more background, in my app a MapView is displayed with the user's current location. After the loc...

How to remove the white background of UITableViewCell

Hello all, I want to remove the default white background of UITableViewCell like I want the background of the cell being transparent so that it shows the actual background of the window. ...

Easy way to feed in a decimal number as string into an NSDecimalNumber?

Reading the documentation, I would have to do something ugly like this: NSLocale *usLocale = [[[NSLocale alloc] initWithLocaleIdentifier:@"en_US"] autorelease]; NSDecimalNumber *number = [NSDecimalNumber decimalNumberWithString:@"0.00001" locale:usLocale]; But: Isn't there a nicer way of telling that NSDecimalNumber class to look out ...

Memory Management with NSDecimalNumber: How to avoid memory problems in tight loops?

I have a tight loop that iterates about 500 times. In every iteration, it will create a few NSDecimalNumber objects to do some arithmetics. Example - this code snippet is in the for loop. the -decimalNumberByAdding: method creates a new NSDecimalNumber instance and autoreleases it. resultDecimalNumber = [resultDecimalNumber decimalNumb...

Localization of Settings.bundle defaultvalues

How can I have a localized default values in the Settings bundle? I encounter this problem for regionally sensitive defaults. Consider an option in the settings bundle to indicate whether to show distances in miles or kilometers. The default settings for en_US and en_GB is 'miles, and km for everywhere else. Does the SDK provide a se...

Positioning MKMapView to show multiple annotations at once

I've got several annotations I want to add to my MKMapView (it could 0-n items, where n is generally around 5). I can add the annotations fine, but I want to resize the map to fit all annotations onscreen at once, and I'm not sure how to do this. I've been looking at -regionThatFits: but I'm not quite sure what to do with it. I'll post ...

XCode Global Breakpoints don't show stack trace

I set up global break points from locations libobjc.A.dylib and CoreFoundation. I run my iphone app and it hits the exception. XCode stops at the breakpoint but does not show any error in the log besides: Pending breakpoint 1 - "objc_exception_throw" resolved Pending breakpoint 2 - "-[NSException raise]" resolved I click the "Continu...

setting audio session property to kAudioSessionCategory_PlayAndRecord why i m not able toplay both recording as well as ipod music simultaneously

i m setting session with kAudioSessionCategory_PlayAndRecord property but still i m not able to play both ipod music as well as recording???? how to do this ???is there is any way to do that............... ...

iPhone SQLlite commands with apostrophes

I'm writing an application for the iPhone that communicates with a SQLite database but I'm running into a small problem. Whenever I try to query information based on a condition that contains an apostrophe, no results are returned.... even if a result that matches the requested condition exists. Let me give some specifics... SQLite Ta...

Accessing Apple SDK Documentation

I'm trying to write a command line script to access Apple SDK docsets (like perldoc for perl or ri for ruby). Apple has a tool called docsetutil which will let you search a docset, but it is very limited (for example, you can't do a partial search). Is there a more powerful way to access the docs without having to manually parse the HTML...

Animating a UIView To A CGPoint

Hi Everyone: I am wondering how I would go about animating a UIView's to a specific CGPoint. The following is what I have so far (which doesn't work in it's current state): #define MOVE_ANIMATION_DURATION_SECONDS 2 NSValue *pointValue = [[NSValue valueWithCGPoint:point] retain]; [UIView beginAnimations:nil context:pointValue]; [UIVie...

Can I provide to NSDecimalAdd() the same NSDecimal used as leftOperand also as result?

I am not sure if that would make any trouble. Normally, lets say, I sum up a few values. I would do it like this: val1 = val1 + val2; val1 = val1 + val3; val1 = val1 + val4; and so on... Could I do something similar with NSDecimal, or should I not provide the same NSDecimal "object" twice in the parameters? (btw, how's that called? no...

Interface Builder vs Cocos 2D - how choice the best for your app.

Hello everyone! I was a flash developer for 3 years, and in the last 5 months, i begin the iphone development, i do 2 applications with interface builder for clients, and now i really want to do a little game, is quite simple, one match 3! I made the engine in interface builder, and seens good to me! But after i read some posts, i really...

How can my iPhone program play m4p media?

I can use Core Audio to play m4a but not m4p. Do you have any idea what method I should use in this case? thank you! ...

pass variable to segmented control's action

I have a segment control that when one of the segments is clicked I want to pass variables (two integers to be specific) to the segmented control's action. How do I modify the below code to do so? I know how to go to the segment action but I don't know how to pass variables to it. I know this is probably obj-C 101 but I'm stumped. Tha...

Undocumented iPhone APIs - Discovery and Use

There are a handful of iPhone apps out there doing some behind-the-scenes trickery with undocumented APIs, with effective results. 1) How would I go about getting a listing of undocumented iPhone APIs? 2) Are there third-party off-the-cuff documentation for some of these APIs? ...

NSDecimalAdd() - what does that const thing mean for the parameter?

Two things are strange with NSDecimalAdd(). First, when I search for examples, people seem to provide parameters by reference like NSDecimalAdd(&foobar, &foo, &bar, ....) and so on. The second strange thing is this const. Why's the parameter saying it wants a constant there? And why does this not apply for result? NSCalculationError NSD...

How to completely unload view controller loaded from nib?

I'm writing iPhone application which uses multiple views, each with own controller. They are loaded programmatically using initWithNibName: and released before switching to other controller, so only one view is visible at a time. After releasing view controller (I have checked that dealloc is called) not all memory is freed. I do release...

Status bar go away... please :)

New view based project in XCode Go to main.xib and view.xib respectively In each case set status bar to none in attributes section for view Not sure why it still shows both on simulator and on platform? Have looked for something in code, but don't see what else is calling this? Anybody know how to turn the status bar off? Thanks // :...

How does [UIView beginAnimations] work?

I was wondering how animations work in Cocoa Touch. For example: [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:1.0]; view1.alpha = 1.0; view2.frame.origin.x += 100; [UIView commitAnimations]; How does UIView tracks the changes to the properties of the two views? I suspect that KVO is used, but does it real...