iphone

use of Delegate in iphone sdk

Can somebody explain me how exactly does the delegate work in iphone sdk.....??? A simple example how to use the delegate and what are the advantages of using delegate. ...

How to construct IBOutlet names in code in order to change them?

Let's say I've got several UILabels which have been set up in IB and connected to IBOulets in code (label1, label2, label3, label4) How would I create these variable names within code, so that I could change the text of each one in a loop, where the labels are taken from a NSArray. Here's the pseudo-code: labelArray = [NSArray arrayWi...

MySQL -PHP insert DATETIME

can anyone please guide me on How to insert a DATETIME filed from iphone through PHP script into MySQL database. $dates = date('Y-m-d H:i:s','2010-10-12 15:09:00'); $query = "INSERT INTO timeTable(time) VALUES ('$dates')"; Thank you.. ...

Parsing Text Between Two Empty XML Elements in Objective C

I already know how to parse XML Elements that contain content (<this> Content </this> in Objective C but I am currently using a web service that returns the content I need in between two closed elements (<begin-paragraph/> The content I need <end-paragraph/>) I have been looking online for any examples of anyone else doing this, but I c...

Help about Tabbar

Hi I want to develop a screen which displays a view named "A" initially and the screen has a menu for navigating towards views "B", "C" and "D". So i thought of creating a tab bar based view in which "B", "C", "D" are tab bar items. In this way tab bar is behaving like a menu. But problem is that for displaying view "A", I need to add "A...

access audio files in app 'Music'

Hello everyone I have an app need to load audio files from the archives in app ‘Music’. Is it possible? Are Audio files in iPhone stored a certain directory? Thanks interdev ...

Referring to a sandbox file from HTML with iPhone

Hi, I'm trying to build a HTML based application for the iPad. I want to build a background process using Objective-C to download images and data and then refer to those from within a HTML file using the UIWebView. I can successfully download an image and save it to the Documents sandbox directory. In the simulator I can see the pat...

Opposite of bringSubviewToFront?

As well as wanting a view to be on top of everything, you might want a view to be below everything, but there is no bringSubviewToBack:. Why not and how do I bring a subview to back? ...

How do I make a movie for upload to YouTube from a series of PNG images on the iPhone?

Does anyone know how to make a movie (avi / mpg) thats uploadable to YouTube from a series of PNG images? Also, how would I add a .caf audio file to that videostream? ...

Problem resigning UISearchBar's firstResponder status

Hi there, I've got a UISearchBar on my UITableView and a method -finishSearching which looks like this: - (void)finishSearching { [overlayViewController.view removeFromSuperview]; if ([sb isFirstResponder]) [sb resignFirstResponder]; myTableView.scrollEnabled = YES; } This method gets called everytime I want to st...

accessing the navigation controller from separate delegate class

Hi I am follwing a tutorial from a book and there the delegate and datasource are separated from the controller (MyViewController.m) [self setDataSource:[[MyViewDataSource alloc] [self setDelegate:[[MyViewDelegate alloc] for understanding, I now want to pop a controller from the delegate class (MyViewDelegate.m) - (void)tableView:(...

Help! Adding image to UIViewController Transition! :S

Hey Guys, I currently have several view controllers and transitions set up throughout my app using: ViewController2 *controller2 = [[ViewController2 alloc] initWithNibName:@"ViewController2" bundle:nil]; controller2.modalTransitionStyle = UIModalTransitionStyleCoverVertical; [self presentModalViewController:controller2 animated:YES]...

Hide the top bar in UITabBarController

Hey Guys, How do I hide the top bar in UITabBarController using OBJ-C code (without using Interface Builder) ? Please see the image in the link below to better understand my requirement. http://skitch.com/jugsvn/dxkr7/iphone-simulator I already have another toolbar as you can see and I don't want this. I'm not using XIB / NIB files ...

Change locale for current iphone application (custom locale for NSBundle?)

Hi, i want to change the locale programmatically in my iphone app (basically because not all languages are supported by iphone itself, it should be possible for the user to switch language only for my application). I have seen on a different question http://stackoverflow.com/questions/1669645/how-to-force-nslocalizedstring-to-use-a-speci...

FTP upload iphone sdk

i need to upload a single file. I have tried ASIRequest or whatever it is called, but would like to have something with a detailed guide. ...

Get remote file size via HTTP without downloading said file.

Any way to get the size of a (remote, http) file without actually downloading it? All other similar questions seem to revolve around grabbing the expectedContentLength from the NSURLResponse object in didReceiveResponse: but I don't want to download the file, I just want to know how big it is. ...

NSFetchRequest without sort descriptors

We cannot use NSFetchRequest without providing NSSortDescriptor(s). All i want to do is fetch the results and show them in the order in which they were created. Is there a built-in way to do that?, or will i have to create a new "auto-increment" field? (which goes against everything CoreData stands for, in my opinion). ...

Can we use UI Automation tools with the iPhone Simulator?

I’ve been using the new UI automation tools with Instruments and the iPhone SDK 4.0, but so far I haven’t been able to get it to run under the iPhone Simulator. I’ve tried setting the target to every location possible—my build folder, the app folder in ~/Library/Application Support/iPhone Simulator, etc.—but I get an error message when I...

Hidden UITabBarController covers Button

I have a hidden UITabBarController but it seems to cover up the buttons that I'd like to place at the bottom edge of the screen in the home view. // hide the tabBar for the home screen - (void) viewWillAppear:(BOOL)animated { self.tabBarController.tabBar.hidden = YES; } Is there a way around this? The tab bar will be shown for the...

UISearchDisplay - application crash

Hi, i've got huge problem. I've copied some code from table search sample from Apple Resource pages. here's the case: #pragma mark - #pragma mark Content Filtering - (void)filterContentForSearchText:(NSString*)searchText scope:(NSString*)scope { [self.chatMessagesArrayCopyForSearching removeAllObjects]; // First clear the filtered a...