objective-c

UISearchBar keyboard doesn't slide out of view when a cell is selected in iOS 4.

I have a tableView with a UISearchBar. Before upgrading to iOS 4, when a user selected a cell and the new viewController was pushed, the keyboard slid out of view to the left with the table. Now, it just stays put on the screen on top of the new view. If I call [mySearchBar resignFirstResponder]; I can get rid of the keyboard, but the a...

In App Purchasing API

I'm researching how to do In App purchasing using the iPhone SDK. Is there any open source code out there regarding this? Both client-side and server side? Apples docs are great but nothing is better than already functioning code to help the learning curve. I am not looking for http://urbanairship.com . I'm looking for server code I cou...

AudioQueue code from SpeakHere fails on iPad.

I've using the SpeakHere audio classes in an App I'm creating that must Play & Record simultaneously. I'm using the newest SDK with a 3.2 device target in a universal app build (targeting iPad & iPhone). The app plays streaming movies using MPMoviePlayerController and Records audio simultaneously. This works 100% perfectly on an iPhon...

Iphone: UISwipeGestureRecognizer question

I see in the documentation that UISwipeGestureRecognizer is available in Iphone OS 3.2 and later. I was planning to use this to detect swipe gestures in my Application. What would be the consequences of running my application in an older OS say 3.1.3 if I do implement UISwipeGestureRecognizer? ...

How do I make an array of SystemSoundID

I cannot seem to figure it out. I can play one sound with: - (void) initSounds { // Get the main bundle for the app CFBundleRef mainBundle; mainBundle = CFBundleGetMainBundle (); // Get the URL to the sound file to play soundFileURLRef = CFBundleCopyResourceURL (mainBundle,CFSTR ("1"),CFSTR ("wav"),NULL); // ...

How to add subview ontop of UITableView?

I have a UITableView that gets populated with data if there is a live network connection. When there is no connection I would like to add a view to the current view that will say No Internet Connection. Similar to the Photos app when there are no synced photos. I am not sure how I can accomplish this. ...

Writing data in file

Hi, I do a iphone apps and I try to write in a file like this: data = [NSMutableData dataWithBytes:LogString length:[LogString length]]; file = [NSFileHandle fileHandleForUpdatingAtPath:filePath]; [file seekToEndOfFile]; [file writeData: data]; [file closeFile]; But the problem is that if I try to write the string "awf", the content o...

Calling pushViewController on a UINavigationController does nothing (no crash)

I have a UINavigationController as one of the views inside a tab bar control. It looks fine, and I have a UIBarButtonItem that is supposed to load a subview. I have the button wired up to an IBAction that calls pushViewController but when I do this nothing happens. It doesn't crash or anything.. it just doesn't do anything. I've tried: u...

How to get and set the wallpaper in objective c on Mac OSX?

I am looking for a way to get (and set) the wallpaper in objective c under Mac OS X. Do you have code/pointer for this? Thanks in advance for your help. ...

CGSSetWindowWarp not working in 64 bits apps

Hello, I am developping a Mac OS X app using the undocummented CGSSetWindowWarp function. Everything is ok when compiing in 32 bits but it stop to work (window dissapear completly) when compiling in 64 bits. Do you have any idée where the issue can be? Thanks in advance for your help Regards, ...

How do some AppStore browser apps implement features such as "Open in new tab" menu, loading progress, etc?

Hi, There are web browser apps in the store which do many things that seem like they use private API calls to me. Things such as: Override the context menu for a link to add a menu item for "Open in new tab" (http://stackoverflow.com/questions/2078039/how-to-add-an-option-to-the-popup-actionsheet-of-iphone-safari) Reporting loading pr...

NSTimer problem

So I am trying to set up a basic timer but I am failing miserably. Basically all I want is to start a 60 second timer when the user clicks a button, and to update a label with the time remaining(like a countdown). I created my label and button and connected them in IB. Next I created a IBAction for the button. Now when I tried to update ...

NSMutableArray object thinks it is an NSArray :(

So I have a property NSMutableArray *grades. At the only place where I set this property, I am doing this: NSMutableArray *array = [[NSMutableArray alloc] init]; self.grades = array; [array release]; [self.grades addObject:@"20"]; The last statement generates an exception: -[NSCFArray insertObject:atIndex:]: mutating method sent ...

Using scanf with NSStrings

I want the user to input a string and then assign the input to an NSString. Right now my code looks like this: NSString *word; scanf("%s", &word); ...

NSFetchedResultsController - not updating after delete.

I'm using a UITableView inside a UIPopoverController that is populated by a NSFetchedResultsController from a Core Data SQL database. The data gets correctly populated inside the table view when it is shown, but if I click on the "Edit" button and delete a row from the table it does not actually remove the row until you reopen the UIPop...

IPhone app as a web server, any advice?

I've seen several programs that do this so that one could copy files (that are generated on the iphone via some app) back to the PC. They do this by making the iphone app run as a web server that gives you an ip address. You just connect to this ip via some browser and then you have links to the files. What I'm wondering is how are they...

Sending loadRequest messages to UIWebView before current view is finished loading causes error

I have a webview as the detail view of a tableView navigation based app. There are "UP" and "DOWN" arrows on the navigationBar that the user can use to page through the different detail views. Everything works fine as long as the user only clicks the "UP" or "Down" arrows once. But if the arrows are clicked multiple times and the loadRe...

Twitter API + OAuthConsumer.framework

Hello, I am working on a test app to help me better understand the way oAuth works with the Twitter API for a bigger app I would like to write, however I am experiencing an issue posting messages to the API after successfully getting an access token. I am using the OAuthConsumer framework as it seemed to be the easiest way to work thro...

Problem trying to translate "+" into character +

I'm having a problem trying to convert a character into a string in Xcode. Here's my code... NSString *temp = [NSString stringWithFormat:@"%@ %@ %@ = %@", inputOne.text, sign.text, inputTwo.text, answer.text]; self.sign.text is supposed to return either a "+", "-", "*", or "/", which it does. However, I'm trying to have the user ...

AIML interpreter - objective c - gui

I want to create an objective c application that interprets a list of .aiml files then make a GUI for it. I want to do this so I can chat with the aiml files within the application. Any ideas on how to do this?? Sample code? has anyone done this before? Thanks! Elijah ...