cocoa-touch

UIToolbar: setItems and UINavigationController setToolbarItems

Hi. I got the following: @interface A : UIViewController { } @property (nonatomic, assign) UIToolbar *toolBar; @end Here the 'toolBar' property can be set from outside to point to a externally created UIToolbar OR it can point to the navigationController tool bar. I want to set the tool bar items independent of witch tool bar 'tool...

How can I translate this php script in Objective-C (Cocoa Touch)

Hi everybody, I have the following php script that allows me perform some calls to other php pages. I have a "data" array that contains a set of "id"s and a "name"s. So the "$data[5][0]" will correspond to the "id" column of the sixth row and "$data[5][1]" will correspond to the "name" column of the sixth row. If I execute this scrip...

How to display time from UIDatePicker

I'm using a UIDatePicker in time mode to get the time. I'm trying to display the time selected in a label. The following code doesn't work NSDateFormatter *outputFormatter = [[NSDateFormatter alloc] init]; [outputFormatter setDateFormat:@"h:mm a"]; label.text = [outputFormatter stringFromDate:self.datePicker.date]; [outputFormatter re...

How to make a view appear translucent

I'm using this to bring up a new view [self presentModalViewController:secondViewController animated:YES]; This completely covers the original view. Is there a way to make the second view translucent so that parts of the original view can still be seen? Can it be done in Interface Builder? ...

Custom UITabBarController

Hi All, I want to customize the look and feel of the tab bar of a UITabBarController. I want to change the colors, the way the icon looks when they are selected, and also, most important of all, I want to reduce the size of the custom toolbar. My approaches for this and the hurdles in it are: A) The first solution which came to my min...

How to search Feeds?

Hi, I want to create an iPhone project which search feeds, like in google reader if we search for some word in "Add a subsciption" tab it will display all feeds related to that so we can add feeds easily. Any Idea how it can be done. Thanks in advance, ...

Layered UIViewControllers overlaps status bar

Following this tutorial and this question, I attempted to create a custom UIViewController containing a UINavigationController. This mostly worked, except that the controller takes up the full screen and so the status bar overlaps it. Downloading the tutorial's source and running it, I found that the tutorial had the same problem (it use...

Show UIButton when Image is touched?

Hello community, is there any way to hide an UIButton until the UIImageView is pressed?? When the picture is pressed I need to show the back Button, like it works at the Photo App on the iPhone??? Here is the code of my UIButton: - (void)viewDidLoad { [super viewDidLoad]; [self ladeImage]; UIButton *btn = [UIButton buttonWi...

How to solve Memory Warning Level-1,then Memory Warning Level-2?

Hi!I am using apple standard code for scrolling+zooming+paging after 10 image scrolling and paging my console gives Memory Warning Level-1,Then Memory Warning Level-2 and then crash how can i stop crash my application?Please help me.I have taken this code from http://developer.apple.com/library/ios/#samplecode/PhotoScroller/Introduction/...

Iphone: Unhiding a Tab bar and Navigation Bar after Navigation

I have a UItabbarController and inside the first tab a UINavigationController. In interface builder I have set the tab bar and navigation bar as hidden. When the first screen loads up (which is a UIVewcontroller in the Uinaviagtioncontroller of the first tab) I set an NStimer for 2 seconds. After which it navigates to a second view. Now...

device rotation iphone

Hi there... All of my widths, heights, positions and everything are set relative to views and such, so if the iphone is rotated it should "expand to fit" as it were. :) How would I go about telling the iphone to be in "landscape mode" ie: refresh, but now all widths are heights and all heights are widths? Thanks Tom EDIT Here is the ...

Dynamically declare function name?

I am creating a list of bar buttons with its action functions (sFuncName as below), it is dynamically changed. When user clicks on a button, sFuncName will be called. for(int i = 0; i < 3 ; i++){ NSString* sFuncName = [NSString stringWithFormat:@"OnFunc_%d:", i ]; barButtonItem = [[UIBarButtonItem alloc] initWithBarBut...

ASIHTTPRequest: Basic Authentication with Base64 encoding?

Does ASIHTTPRequest uses Base64 encoding for username and password? On the webpage I only found out that the username/password is in plain text if SSL is not used. ...

ASIHTTPRequest: keychainPersistence

ASIHTTPRequest can store the username/password in the Keychain. How does this work? 1) Is the built in authentication dialog (ASIAuthenticationDialog) coming up and stores the username/password only for the first time? When will the dialog be presented? 2) What about the next requests? Is always the same username/password used? 3) Wha...

ASIHTTPRequest: check if username/password is correct

How can I check a webservice if the username/password is correct? I don't want to transfer the whole response body. I only want to know if the username/password exists and is correct. Currently I'm sending a request to my webservice like this: self.request = [ASIHTTPRequest requestWithURL:urlObject]; [self.request setUsername:username]...

NSArray and bool values

Can an NSArray hold an array of bool values? The following code runs BOOL b = NO; NSMutableArray *array = [[NSMutableArray alloc] init]; [array addObject:[NSNumber numberWithBool:b]]; NSLog(@"value is %d", [array objectAtIndex:0] ); However, I don't get a value of 0 for NO as expected. Instead, this is what I get value is 3773...

ASIHTTPRequest: when does ASIAuthenticationDialog appear?

When does the authentication dialog appear? If I didn't set the username/password in the request or URL? ...

Date and time zone problems in Cocoa

I hav a string e.g. 2010-09-24. Now I want this string read as it is in an other timezone as I am. So I create an NSDateFormatter and set it's time zone e.g. to Europe/Berlin. What I get back is an NSDate object adjusted (2010-09-23 18:00:00) to my local time zone (e.g. America/New_York). But I want an NSDate in the time zone Europe/Be...

UISwitch in a UITableView cell

How can I embed a UISwitch on a UITableView cell? Examples can be seen in the settings menu. My current solution: UISwitch *mySwitch = [[[UISwitch alloc] init] autorelease]; cell.accessoryView = mySwitch; ...

asking if user wants to use Location Services

How does the process of "asking if user wants to use Location Services" work? I read here that a dialog at the installation appears, which asks the user if Location Services should be allowed or not. Does it mean that there is nothing to do for the developer, because the user can change this behavior in settings? So there is no "asking ...