iphone

adding a background image to UITabBarController

This is what I have from googling, but evidently it's not what I need: - (void)applicationDidFinishLaunching:(UIApplication *)application { // add the tab bar controller to the window [window addSubview:[tabBarController view]]; // load the image, create a view with the image NSString* dirPath = [[NSBundle mainBundle] bundlePath...

Force UITextField to keep firstResponder after validation failure

------------------------ deleted ...

iPhone:The tabbing on a word playing back the recorded voice

Hi , I want to repeat here a functional: -Tap a Word or Drawing to seek in the audio. -Text and Drawings will highlight at the time they were recorded. Working example: http://www.youtube.com/watch?v=H9e9v_6Buoo Could you help me, how I can make it. Thanks a lot. ...

Can we change the device time using an application?

Hi everyone.. Want to know whether its possible to change the time of the iPhone through an application.. Is that level of dev access granted in iOS4? My gut feeling is no, but I'm looking for a definitive Yes/No answer if possible. Note: NSTimeZone class states 'Cocoa does not provide any API to change the time zone of the computer,...

textFieldShouldEndEditing called multiple times

Hi all, I am working on a view that has multiple UITextField objects. My view controller serves as the UITextFieldDelegate, and I've implemented the (BOOL)textFieldShouldEndEditing:(UITextField *)textField method to save and validate the record being displayed. If the user clicks on the "Done" button after editing an item and the save...

iPhone : Does a fastly updating (60 fps) accelerometer drain battery?

I'm making an accelerometer based app using cocos2d, and I noticed that it's possible to set the accelerometer update time. [[UIAccelerometer sharedAccelerometer] setUpdateInterval: (1.0f / 60.0f)]; I was wondering if updating the accelerometer very often like this, 60 times a second is a battery drain? Or should I not worry at all? ...

How to read a local xml file

I want to create a NSURL object out of a NSString, where I use -fileURLWithPath:(NSString ) I put my xml file as my source file, and name it event.xml. But NSString URL = @"event.xml"; NSURL a = [NSURL fileURLWithPath:URL]; but then my xmlparser return a connection failed error. so what's the correct way to specify the path of a xml i...

iOS 4 has an In-App SMS SDK for sending messages, but is there a way to have your App receive incoming SMS messages?

iOS 4 has an In-App SMS SDK for sending messages, but is there a way to have your App receive incoming SMS messages? Thanks so much in advance for your help! ...

Simple (SQLite-)database framework

Hey. Do you know if there is a simple database framework that is free to use in iPhone development? I've tried to get my head around Apple's framework SQLite3-framework, but it is just too complicated. Why can't it just be like PHP and databases … So basically, what I want is a framework that is simple to use and can handle databases....

AudioQueueStart fails when iphone app running in background iOS4.0

I'm having difficulties starting the AudioQueue when my app is in the background with iOS4.0 The code works fine when the app is active, but fails with -12985 code when running in the background. err = AudioQueueStart( queueObject, NULL ); if( err ) { NSLog(@"AudioQueueStart failed with %d", err); ...

reachability.m and .h + Global UIVIew for error

Hello, I added the reachability.m and .h files. When theres no internet connection, i want to display a UIView which is semi transparent and and comes up at the bottem like a Toolbar saying No internet Connection Available I've got the code etc.. but i need a way to display the UIView i created and to push it to the front of everything...

iphone app html in document search

The iphone app im writing displays an html page, i would like to add a search feature where the user can search for instances for the keyword and highlighted (like in firefox ctrl+F) what's the best way to do this? in objective-c? would this be even possible with javascript? ...

Core Data , NSFetchResultsController leaking

Hi, I am not sure if the leak is in my implementation or is it from apple's side.... Instruments indicate me that I have a leak in this line : if (![[self fetchedResultsController] performFetch:&error]) I am adding annotations by reading the fetchController to the Map.... like this : -(void)fillMapWithAnnotations{ NSError...

Apple "Your First iPhone OS Application": Never gets to the white screen of the app when the documentation says it must

I´m going through Apple´s Your First iPhone OS Application tutorial. I´m stuck in the Adding a View Controller Part. There´s the part that mentions "To make sure you’re still on track, confirm that your HelloWorldAppDelegate class implementation (HelloWorldAppDelegate.m) looks like this:". What follows is a source listing which I´m tryi...

UITableView editing accessory view divider color

I have a UITableView with the editingAccessoryType set to UITableViewCellAccessoryDisclosureIndicator. The result is this: It works, but I have a custom background, and therefore a custom separator color. However, the divider between the rearrange control and the accessory is set to the same standard table view separator color. Is the...

Why Does an Array in iOS 4.0 Appear as __NSArrayI (And How Do I Match it)?

An object which used to identify itself as NSCFArray under previous iPhoneOSes now seems to identify itself as __NSArrayI under devices running iOS 4.0. Any idea what's up with this? I can't find it in any documentation. In addition, it doesn't match "[NSArray class]". It should be a simple array. It's defined like this: NSDictionary...

Check if constant is defined at runtime in Obj-C

To, for example, access variables in a NSDictionary Cocoa frameworks often define keys, such as UIKeyboardBoundsUserInfoKey. How can I check if a key is defined at runtime? I found examples on how to check for classes and functions, but not for constants. ...

Customising UITableView

Hi all, I'm playing with Xcode/Interface Builder and I'm able to build simple Navigation apps. I'm wondering how the guys at TapBots manage to get their table views themed like this: http://tapbots.com/img/software/convertbot/screenshot_05.jpg (http://tapbots.com/software/convertbot/#gallery) I've tried setting backgrounds on tables, b...

CATiledLayer changing images with different sizes when zooming (Map related :)

I have an UIScrollView with a UIView which in turn contains a CATiledLayer which displays a map. I have to start with an overview where one can zoom in VERY deep. So I made 4 different images (actually PDFs) with 4 different sizes of the map (the largest has something like 5700 x 6700px) I add the smallest (the overview) to the CATiled...

sqlite3 with iPhone multitasking - Do I need to properly close database?

I keep my database open for the life of the app and close it on termination. Now with iOS 4.0 multitasking, when going to the background, my app saves data but doesn't close the database. I believe this means that my app will always eventually get purged from memory without ever properly closing the database (or finalizing statements)....