objective-c

Access audio or video file by using my application in iPhone

i want to make a list of all audio or video file stored in iPhone with the help of my application. I know the mp3 is stored at "var/mobile/media/iTune_control/music" this path. But when i run my application using this path, it show there is no file at this path. I think the certain path is write protected. Is there is any way to find the...

Is there a way to set a separate short title for UITabBar?

I'd like to be able to give my views short names for display on the tab bar, and longer (more descriptive) name when the same view is linked to in a table view. The reason is that longer names nudge up against each other on the tab bar. In a table view, there's more horizontal space, so I want to use more descriptive titles there. Norma...

Is releasing memory of Objective-c 2.0 properties required?

Something I have been wondering about properties for a while. When you are using properties, do you need to override the release message to ensure the properties are released properties? i.e. is the following (fictitious) example sufficient? @interface MyList : NSObject { NSString* operation; NSString* link; } @property (retain) NSStri...

UIPasteboard - cannot copy text

This code should copy the string to the generalPasteboard, as the [[UIPasteboard generalPasteboard] string] object, but the method causes the program to terminate. - (void)copyResultToPasteboard { NSString *message = self.resultTextView.text; [UIPasteboard generalPasteboard].string = message; [message release]; } I think i...

Weird UI problem when modal view is dismissed

Hello. As shown in the screenshot below, i have a UITableView with some info and upon selecting a row an ABUnknownPersonViewController is invoked. In order to be able to able to dismiss that and go back to the UITableView I have this code: ABUnknownPersonViewController *unknownPersonView = [[[ABUnknownPersonViewController alloc] init] a...

Is Objective-C a 3GL or 4GL?

I'm having a little debate with a friend about Objective-C being a 3GL but he believes it is a 4GL because descriptors make the language english like. I disagree with this and I know it is sometimes a fine line. Is Objective-C a third generation language or a fourth generation language? References to support your answer will be appreci...

How to consume WMS (Web Map Service) using objective-C

Hi, I'm new to Objective-C and I was asked to develop an app on iPhone to pull down map images via WMS (Web Map Service). I've tried many ways but it doesn't work, I need some sample code. Thanks in advance! ...

How to use an icon as back button for UINaviationController

Hey, Does anyone know how to use an icon instead of text for the UINavigationController back button? ...

How to take test value of NSButton ?

how should i take NSButton text value , e.g if i use 2 buttons with text Click and Cancel, i want to check which button is clicked and then show a message with NSRunAlertPanel(...) which button i have clicked..what code should i write for it when the button is clicked. ...

iphone email attachment

I used the MessageUI framework to send the mail with attachment from my application. But i got the following error, 2009-09-07 19:52:23.483 emailTest[11711:5b17] Error loading /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/System/Library/DataClassMigrators/AccountMigrator.migrator/AccountMigrator: ...

iPhone --- 3DES Encryption returns "wrong" results?

Hello fellow developers, I have some serious trouble with a CommonCrypto function. There are two existing applications for BlackBerry and Windows Mobile, both use Triple-DES encryption with ECB mode for data exchange. On either the encrypted results are the same. Now I want to implent the 3DES encryption into our iPhone application, so...

Get selected row in UIPickerView for each component

Hi all! I have an UIPickerView with 3 components populated with 2 NSMutableArrays (2 components have the same array). A tutorial says: //PickerViewController.m - (void)pickerView:(UIPickerView *)thePickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component { NSLog(@"Selected Color: %@. Index of selected color: %i", [arra...

NSDictionary. How do I create directly from aformated file?

This is a fairly trivial data parsing question. I'm just unclear on the methods I should be using to pull it off. I've got a plain text file of a few hundred lines. Each line is of exactly the same format. The lines are in contiguous chunks where the first item in a line is essentially a key that is repeated for each line in a chunk: k...

addAnnotations issue (memory management maybe?)

Hi guys! I'm having some problem with MKMapView / annotations / UINavigationController. Basically, i manage my views using a UINavigationController; one of my view contains an MKMapView and i add annotations on it (10 to 200) using the addAnnotations method. Everything is working fine except for one thing : if i navigate "too fast" on m...

MKAnnotationView in both hovering and pinned states

I'm trying to add a pin (MKAnnotation and MKAnnotationView) to my MKMapView and allow the user to drag it around. I'd also like to make the dragging of the pin animated and interactive like the iPhone's Map App. My question is how do I change the state of the MKAnnoationView so that it's hovering over the map (so the pin isn't actually...

NSString retain Count

Hi, Just couple of days i was working on a project and i have to see what is retain count of a string. But it always return me "2147483647", Why it is so? Check out this code to check it yourself. NSString *str = [[NSString alloc] initWithString:@"Hello World"]; NSLog(@"String Retain Count: %i", [str retainCount]); So my question i...

iPhone programming: Sending data from one iPhone to another?

Hi, I am new to iPhone development. I created an iPhone application, using which user can create a Business Card kind of UI in TableView. I want to know how can i send a Business Card(which i created programmatically) data into another iPhone via SMS? I want to know the technology which i should use to sending such thing from one iPhone...

Calling a method when UITabBar is selected?

Hi all, I'm currently writing a app on the iPhone and was just wondering if anyone knew a way to call a function but only when a tab is selected. I have a separate view controller for the tab in question and I want to call a function which updates the GPS position when the tab is selected. If anyone could help that would be great :) ...

Why isn't my UIViewController in the responder chain for its view?

I have written a subclass of UIViewController which creates a view programmatically, instead of loading it from a NIB file. It has a simple loadView method: - (void)loadView { UIScrollView *mainScrollView = [[UIScrollView alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; self.view = mainScrollView; [mainScrollVi...

iPhone add icon in status bar (a la Battery Indicator)

Hi all! I was wondering if it is possible to add an icon to the iPhone status bar, much like the battery and wifi indicator. How can I do this? Thanks. ...