iphone

How to replace an object in an NSMutableArray at a given index with a new object

Hi guys. I have an NSMutableArray object(retained, synthesized as all) that is initiated just fine and I can easily add objects to it using the 'addObject:' method. But if I want to replace an object at a certain index with a new one in that NSMutableArray, it doesn't work. For example: ClassA.h @interface ClassA : NSObject { NSM...

Purchase music from iTunes store without leaving app?

Hi all, Is anyone aware of a standard way of allowing a user to purchase music from the app store without leaving the app? For instance, if a band has an album for sale on iTunes and then releases an iPhone game featuring the band members, is there a "standard way" to allow the user to buy songs without leaving the app? From what I c...

[NSCFArray row]: unrecognized selector sent to instance 0x3953a20

I get a crash with this console message: Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '* -[NSCFArray row]: unrecognized selector sent to instance 0x3953a20' This happens when I scroll trough a table that gets its data from an array of dictionaries. ...

iPod Serial Commands

I was wondering if anyone knows if Original iPods (ie. 4th generation and up) and iPod Touches/iPhones use the same type of serial commands to do communications? Do you know if because of the new OS on the Touches they have changed how the serial communicates? Or did they drop the serial command protocol all together? ...

How to use an background image for the section header in the UITableViewController ?

HI I have a UITableViewController where I also use the section header. Now is there any chance to use an image as background for the section header ? Thanks ...

iPhone Twitter Integration: Validating login.

Update: Using the following gets back an XML response. Used NSXMLParser to check for "errors" element. Not the cleanest method but gets the job done. I am open for suggestions. NSURLResponse *response; NSError *error; NSData* result = [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:&error]; NSString ...

How to use CFNetwork to get byte array from sockets?

Hi, I'm working in a project for the iPad, it is a small program and I need it to communicate with another software that runs on windows and act like a server; so the application that I'm creating for the iPad will be the client. I'm using CFNetwork to do sockets communication, this is the way I'm establishing the connection: char ip[...

Can I use a keyPath in a predicate?

For some reason, this didn't work (although the keypath does exist): The Entity is set on the Employee. NSPredicate *predicate = [NSPredicate predicateWithFormat:@"department.departmentName == %@", departmentName]; [fetchRequest setPredicate:predicate]; NSError *fetchError = nil; NSUInteger count = [moc countForFetchRequest:fetchReque...

Is it a UIViewAnimationTransitionFlipFromRight bug ?

Hi, I've got next problem: I've nice worked flip animation, but when before animation i've rotate my device: 1/ Flip going by the horizontal axis (rather than vertical as it should) 2/ My controller.view (i've use controller.view) has previous orientation. Where am I wrong? thanks ...

XCode: insertSubview, removeFromSuperview, viewDidLoad... Pulling it all together.

I feel like I'm missing something basic here, and I would appreciate it if you'd help me pull it all together. Let's say that I have two view controllers... ViewAController and ViewBController. If I wanted to show viewA, I would do this: ViewAController *new_view = [[ViewAController alloc] initWithNibName:@"ViewAController" bundle:nil...

UIDatePicker, setting maximum and minimum dates based on todays date

If I have a UIDatePicker, and I wish to set the minimum and maximum date range to be between thirty years ago and thirty years in the future, how would I set that up? ...

How to iterate over an dictionary without knowing the keys, while getting key and object?

I have an NSDictionary and want to iterate over the objects. But at the same time, I need to know the key of the dictionary. I remember there was a special, fancy form of fast enumeration, but have forgotten the exact syntax. Anyone? ...

iPhone SDK - On Device Locked or On Device Unlocked and application shown

I need to find a way to detect when a device has been locked, or else a way to detect when the device has been unlocked, and sent straight to the app where it left off. Is there some method like: - (void)applicationDidBecomeActiveAfterLockScreen:(UIApplication *)application ...

iPhone Crash Log doesn't contain methods or line numbers

Hi all, my app crashed, then I connected my iPhone to my Mac OS X, found the crash log in the "Device Log"-section of XCode. What do I have to do to see methods or line numbers? I don't know where to look for the error with the information provided... Thanks a lot! Incident Identifier: 3A2C8BCE-1393-4E50-9FEF-9CD5A5E39DD9 CrashReporte...

Campus Tour iPhone App

I am I want to develop a Campus Map application on iPhone. I am searching for a way to figure out how to sync Current Location from Maps with my campus map. Or is there any other approach for building this app ? Suggest some good websites/ blogs/ groups working on something similar so that I can get information. ...

Quadruple the size of every iPhone app... just to display simple banner ads?

Has anyone had any luck using AdMob or AdWhirl to put ads in their iPhone apps? AdMob admits it makes apps HUGE. (often increasing them to QUADRUPLE their original size) Does anyone know why so much massive code must be included over and over again... inside every app I write... just to display some simple banners and count them???? ...

iPhone app crashes with sqlite3_bind_text()

I'm attempting to make a simple app that stores and displays flash cards, however I'm having an awful time getting my SQLite to work. The database connection is fine, but when I try an insert, it crashes and gives no indication of what went wrong. This is the code I am using to insert the flash card into the table. const char *insert =...

only show half screen of controller using presentModalViewController

i have a UIViewController that is only about 260px tall(or at least the area i want viewable is 260 approx. height) and really just has a picker on it and a done button. I'm calling presentModalViewController to display it but its showing the whole view, when really i only want to show the picker and the done button bar above the picke...

ipad simulator - sandbox area

Every iPhone/iPad application has its sandbox area, where I can store files. When I use the simulator this area will be somewhere in the hard disk. Is it possible to see this directory and its contents for a given application? I am debugging an iPad app and it will be a lot easier if I can see the sandbox area contents in real time, as ...

UIButtons work when rotated right, but not when rotated left. Huh?

I have a view that is added to the current view when the device is rotated to a LandscapeLeft or LandscapeRight orientation. This view has 4 buttons on it that are all connected to outlets and each have the "touch up inside" event hooked up to the same action. If rotated to a LandscapeLeft orientation, I transform my added view to rota...