objective-c

Decode Utf8 string Problem

This is a Korean UTF8 encoded string: NSString *encString=@"íì¤í¸"; How can you decode this in UTF8? ...

Pins coming on the CallOut view

Hi all, I am implementing a map based application, In that I found a bug that is, some times the pins or rendering upon the call out view. Is it possible to resolve this? Thanks in advance, S. ...

Detecting hold on a object - iPhone Objective C

Hi all, How can I detect if a user holds their finger down on an onscreen object for 1 second ? Thanks, Martin ...

My MoviePlayer doesn't respond to function

I am facing problem of memory leak and other MoviePlayer new initiation as my MoviePlayer doesn't respond to function, in which I am releasing that player on my done button. (void) playMovieAtURL { MPMoviePlayerViewController *mpViewController = [[MPMoviePlayerViewController alloc] initWithContentURL:[NSURL URLWithString:videoURL]]...

iPhone, where my sqlite db on my mac ?

I've added a function so that my database resides on the device, however, in the simulator I can't find it on my mac at all. It used to be in Machintosh HD before I used my function. + (NSString*)getDBPath { NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [...

Finding closest location using CLLocationManager

I have a bunch of airports with geocoordinates stored in a glist. I am then using CLLocationManager to get current location. I now want to go through each item in the glist and compare it to the current location and order the airports from closest to furthest. My algorithm sucks - any ideas? ...

Is there an implementation of Levenshtein distance or similar for iphone?

Hi, I want to take a string entered in an iphone app and populate a tableview with strings from a dictionary that are likely correct spellings of the word. I understand levenshtein distance is the way to do this but wondering if anyone was aware of any way to do this natively or whether there was a library that i could use? Peter ...

Implementation of Quick Look API's in iphone

Hi, I want to implement Quick Look API's in my iPhone application for the document preview but don't know how to do this ? Please help me by referring sample code or application. Thanks ...

Objective-C, how do i convert a double to an int ?

I must be doing something really obviously wrong, but I can't see it. ...

How to name a constant in Objective-C?

What's the naming convention for constants in Objective-C (or most widely used way to name them)? Is there a different criteria for extern constants? Some styles I have seen: NSString* const kPreferenceFirstRun = @"FirstRun"; // Replace "XY" by a prefix representing your company, project or module NSString* const XYPreferenceFirstRu...

Video capture on an iPhone; captureOutput delegate never called

Hey folks. Trying to get started with iPhone video capture stuff, and having a terrible time getting it going. At the moment, working with an exact copy of the sample code from this Apple Developer Q&A: qa1702; not going to re-paste it here, since it's a relatively big blob of code. In any case, I copied and pasted that code into an o...

iOS YouTube and Safari-like movie player

This is probably a dumb post but I've Googled it for about an hour now and can't find anything about it anywhere... I'd like to know how I can have a little movie "square" similar to the ones presented in Safari to play Quicktime Movies or YouTube movies. I'm talking about that :). Is that an Apple private API or can we use the API? ...

Shadow doubling in custom UITableView - how to remove?

I'm trying to build a custom UITableView with custom cells and headers. I have a subtle problem - when the table view's Cell scrolls underneath the Header, the shadow gets doubled. The header and the cell are both PNGs with transparency, and behind the table is a gradient that I want to show thru. See the edge of the table in this scre...

How can I convert CFAbsoluteTime to DateTime in C#?

Hello everybody! Can anyone tell me how can I convert a value which I know to be CFAbsoluteTime from MacOS into DateTime value in C#? ...

CoreMidi.framework sending midi commands

there is an app called FreeStyler, that you can control using midi commands. In my mac app I want to send midi signals. Can someone show an example of this? Elijah ...

Possible to move UITableView's index?

I'm using the sectionIndexTitlesForTableView method for my custom UITableView, to display A-Z on the side of my table. However, the standard view of this doesn't match the style of the table. Is there a way to change this, or at least move the index a little? Here's how it overlaps: ...

Detect Objective-C runtime version at runtime?

I'm searching for a way to dynamically detect the version of the objectivec runtime. It's different from iPhone Simulator (old) to iOS Devices (new) runtime. And some fancy stuff actually depends on the differences. For now I hacked around that issue with a preprocessor define: // simulator is a 32-bit mac app with old runtime, iOS de...

iPhone SDK Random Numbers

Hi I know I can get a random number for example from 0 to 700 using: arc4random() % 362 But how can I get a random number in between for example 200 to 300? Thanks. ...

read version from info.plist

I want to read the bundle version info from info.plist into my code, preferably as a string. How can I succeed? ...

Trying to Integrate Mail Into my app, getting 2 warnings.

I'm trying to integrate sending mail into my app, but I end up with 2 warnings. I am using Obj-C, the Cocos2d Framework. This is my code. -(void) mailTapped: (id) sender { MFMailComposeViewController *composer = [[MFMailComposeViewController alloc] init]; composer.mailComposeDelegate = self; if ([MFMailComposeViewController canSe...