iphone

Storing image in plist

How can we store images in plist file. Where is this plist file stored? Can anyone give me an example? Answers will be greatly appreciated! ...

How to create a search field like the one in Mail application ?

Hello, I would like to create a search field exactly as the one in Mail application. The field is first hided, and when an user scrolls down, it appears. Could you help me and give some directions where to look for ? Thank you very much in advance. ...

diffstrings.py : how do you specify path arguments?

I am trying to use diffstrings.py from Three20 on my iPhone project, and I can't find the proper format for the path arguments (as in "Usage: diffstrings.py [options] path1 path2 ..."). For example, when I run the script in my Xcode project directory like this ~/py/diffstrings.py -b it analyzes just the main.m and finds 0 strings to lo...

Objective C / iPhone comparing 2 CLLocations /GPS coordinates help

Ok , so thanks to Claus Broch I made some progress with comparing two GPS locations. I need to be able to say "IF currentlocation IS EQUAL TO (any GPS position from a list ) THEN do something My code at the moment is : CLLocationCoordinate2D bonusOne; bonusOne.latitude = 37.331689; bonusOne.longitude = -122.030731; Which is th...

How to get accuracy memory usage on iphone device.

I want to output accuracy memory usage on iphone device, the method I used was taking from, http://landonf.bikemonkey.org/code/iphone/Determining%5FAvailable%5FMemory.20081203.html natural_t mem_used = (vm_stat.active_count + vm_stat.inactive_count + vm_stat.wire_count) * pagesize; na...

iPhone file corruption

Is it possible (on iPhone/iPod Touch) for a file written like this: if (FILE* file = fopen(filename, "wb")) { fwrite(buf, buf_size, 1, file); fclose(file); } to get corrupted, e.g. when app is forced to terminate? From what I know fwrite should be an atomic operation, so when I write whole file with one instruction no corrup...

iPhone basic sheet programming?

Hi, I want to program an "Add"-Window to my application, much like the "Add Contact"-window in the Contacts app or the "Add City"-window in the Weather app. My question is: how do I code the effect of sliding up that Contacts & Weather feature? -- Ry ...

How to use the default background image for iPhone UIView?

How can I use the default background image for a UIView? ...

Build and test on 2.2.1 iPod Touch with XCode 3.2.2?

I've just installed Xcode 3.2.2 with iPhone SDK 3.2 Beta 5 (Snow Leopard) This version of Xcode didn't come with any iPhone SDKs older than 3.0. But I want to create an app that runs on all devices from iPhone OS 2.2.1 -> 3.1.3. I managed to add older SDKs into Xcode by downloading iPhone 3.1.3 with Xcode 3.1.4 and installing each 2.x ...

How to put a UITextField inside of a UITableViewCell (grouped)?

How to put a UITextField inside of a UITableViewCell (grouped)? I want a user to be able to edit it. ...

Catching an exception when trying to launch a URL service from within Safari on an iPhone

Hey guys, I was wondering if anyone knows - if I have an iPhone app that is registered with a URL service (e.g. alocola://), which means another app can invoke it by calling its URL - is there any way to embed this URL in an HTML page, and catch the exception if the app is not installed on the user's iPhone? Or in other words / more de...

error: 'NSUnarchiver' undeclared (first use in this function)

I have just tried using the NSArchiver but for some reason I am getting this error. I have downloaded a sample project and get the same error too. Could it be something wrong with my installation?! Thanks ...

[iPhone] presentModalViewController not working

Hi, here's my code: ViewController *vc = [[ViewController alloc] initWithNibName:@"TableView" bundle:nil]; [self.navigationController presentModalViewController:vc animated:YES]; //[self setView:[vc view]]; If I call it, nothing happens. However, if I change it to: ViewController *vc = [[ViewController alloc] initWithNibName:@"Table...

How to store enum values in a NSMutableArray

My problem is since an enum in objective-c essentially is an int value, I am not able to store it in a NSMutableArray. Apparently NSMutableArray won't take any c-data types like an int. Is there any common way to achieve this ? typedef enum { green, blue, red } MyColors; NSMutableArray *list = [[NSMutableArray alloc] i...

Are subversion conflicts in project.pbxproj normal?

If I add files to my project, and my co-worker adds files to his project, and we both check our files in, should we expect to have conflicts? What's the best way to handle this? ...

Iphone: UIWebview and double taps

I would like to trap a double tap event in a UIWebView. I have derived a class from UIWebController. When I double tap it seams that the UIWebController itself is responding to my double taps instead of my class. The weird thing is that when I change the inheritance to inherit from UIView everything works just fine. Below are snippets f...

What's the fastest way to determine if a file adheres to a particular class's NSCoding implementation?

Given: An application that accesses a directory of files: some plain text, some binary files that adhere to a particular NSCoding implementation, and perhaps other binary files it simply doesn't understand how to process. I want to: Be able to figure out which of the files in that directory adhere to my NSCoding class, and I'd prefer no...

How to edit Selection indicator in UIPicker?

Ad you can see, there is a example. The UI picker's Selection indicator. How can I do the similar thing on my Apps? ...

How to get UIScrollView contentOffset during an animation

I am trying to get the contentOffset property of a UIScrollView in the middle of a setContentOffset animation. Note I am not using the animated property of the method, but instead enclosing the setContentOffset operation within a UIView animation block so I can have finer control. When I try to read the value of contentOffset in the mid...

Simple way to show the 'Copy' popup on UITableViewCells like the address book App

Is there a simple way for subclasses of UITableViewCell to show the 'Copy' UIMenuController popup like in the Address book app (see screenshot), after the selection is held for a while? ...