iphone

iPhone + UITableView + format cells

Hello, I am using following method in my application: - (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath { if(indexPath.row == 0) { cell.contentView.backgroundColor = [UIColor lightGrayColor]; cell.contentView.alpha = 0.5; } } When I run ...

sqlite3 database array handling

hii, i am creating NSMutableArray in appDelegate and creating class for database handling operations i hav a function in which in am returning the arrray from the function but when i am displaying the value in UITable view it's not showing . the array which is returing is not reating it's value. can u please help me out. ...

how to access iphone system preferences

How can I access (read) the "global preferences" in an iPhone application. Idea: my application provides "keyboard clicks" - I want to enable / disable them depening on what the users has set on his iPhone settings. But I have no idea how to read those settings (also the "mute switch" status would be interesting). ...

How to include resources in iphone static library ?

I'd like to include files, data and images in a static library API so the users won't need to include them manually in their project. I see that there isn't obvious way to do it but is there some hack or workaround to achieve this goal ? Thanks ...

Android version of AVAudioPlayer's averagePowerForChannel

Does Android have a similar method to the iPhone AVAudioPlayer's averagePowerForChannel? I want to get an average reading of the amplitude of as a value. ...

Access NSMutableArray to an index with no value

Hello, if i try to access a nsmutableArray with objectAtIndex:x and if i have no object at this index, my app always crash. So my question is: how can i check, if there is something at this index, without crashing the app? I hope your understand my question. Thanks, Alex ...

How can I make an iPhone reel like in FlickFishing?

Hi, I'm new in iPhone development, and I want to make a custom Reel/Spinner like the Reel in many iPhone fishing games, and I want capture the touch events, such as if the reel is moved to the right/left. Where should I start? Thank You! ...

Local Time To GMT conversion

hi everyone, can anyone suggest me a way to convert local nsdate object to Gmt in objective c. i have searched for the api but didnt get. thanks ...

question related to iphone

hi i have written 1 code for -(IBAction)action:(UIEvent *)id { [act setImage:[UIImage imageNamed:@"down.png"] forState:UIControlStateHighlighted]; } it's working but i have written 1 code for -(IBAction)action:(UIEvent *)id { [act setImage:[UIImage imageNamed:@"down.png"] forState:UIControlStateHighlighted]; and ...

UITextView autoscroll to last line

Hi *, When writing in a UITextView more text than can fit entirely inside it, the text will scroll up and the cursor will often place itself one or two lines above the view's bottom line. This is a bit frustrating as I want my application to make good use of the entire height of the text view. Basically what I want is to configure the ...

Is an iPhone Call Recorder theoretically possible?

NOTE: I know neither the iPhone SDK or Objective C, just wondering if possible. I know obviously it would have to be on a Jailbroken device anyway, but it is technically possible for a iPhone call recording application to be made, or is it not possible to hook into the calls or the audio input/output? I know obviously there would be no...

Convert NSString to NSDate

Hi, I'm trying to convert a NSString to an NSDate. If the iphone region is set to english (USA) it works perfect, but when I set it to Swedish it doesn't. My code: [...] // Get the date from the post NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; [dateFormatter setDateFormat:@"eee, dd MMM yyyy HH:mm:ss ZZ...

How to setTimeStyle AM/PM to lowercase using the iPhone SDK

How can I set the AM / PM time style to lowercase? I'm using the following code and according to Apple's documentation this should returned these values as lowercase but it doesn't. [_detailsTimeFormatter setTimeStyle:NSDateFormatterShortStyle]; ...

Creating a CalDAV service with .Net

I want to create a calendar in my application that external users can view. The CalDAV (basically WebDAV+iCalendar) format seems to be relatively widely supported, although if rather unusually by some clients (Outlook, for instance). Completely new to me though. I want to externally publish events, I don't need users to be able to upda...

iPhone view uiorientation not working after changing the viewcontroller

Hey Guys, I have 2 view controllers, when the app is in the firstview the orignal view the uiorientation works fine but when I swtch the view and come back to the first view the uiorientation doesn't work. I tried to make the firstview becmefirstresponder but no luck. What can I do to fix thus issue? ...

iphone sdk uisearchbar search with in a plist file

hi i have a big problem searching a data.plist file in my iphone project: I've seen several tutorials but the did not help in my case. my plist file looks like this: root- Rows- item 0- title (string) item 1- title (string) item 2- title (string) .... g...

How to stub a class method in OCMock?

I often find in my iPhone Objective-C unit tests that I want stub out a class method, e.g. NSUrlConnection's +sendSynchronousRequest:returningResponse:error: method. Simplified example: - (void)testClassMock { id mock = [OCMockObject mockForClass:[NSURLConnection class]]; [[[mock stub] andReturn:nil] sendSynchronousRequest:nil ...

How To Find the Most Accurate iPhone GPS Results

Hi Everyone: I recall reading somewhere (I forget where) that if an iPhone application simply ran the CLLocationManager once, it didn't come up with the most accurate results. Is this accurate, and if so, how can I combat this problem? I want to come up with the most accurate GPS results, and am wondering if only one time will create ...

Muscial notation on the iPhone. Any suggestions for example code?

I'm writing an iPhone app where I'd like to display some simple musical notation (just a chord or two). This question is a call for suggestions on the quickest way to go about it. For instance: Is there any iphone OR objective-C libraries for doing this that I'm missing? Are there any examples of open-source objective-C software in th...

how to implement delete functionality from the iphone photo library?

I am implementing photo galary.now i want to implement delete photo functionality(animation) from the gallery same as default delete functionality in the iphone photo library.So please advice me. ...