iphone

How to set the autoresize property to change according to orientation in iPhone?

Hi, I have an application created with a root class to be UIViewController class. I have placed one button on its view with frame size fixed in the view and have also set: -(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return YES; } Now when i rotate the button remains in the ...

Adding view on StatusBar in iPhone

Hi All, Is it possible to add a UIView on the staus bar of size (320 x 20) ? I dont't want to hide the status bar , i only want to add it on top of the status bar. Thanks ...

Persist UIWebView content and address after changing views

I am using UIWebView as a web browser on my application and when I open an url with my browser and return back to the main view, then go to browser view, my webview doesn't save the content. So, if I go to google.com and switch views, then again go to the browser view, I have to type the url again to open the webpage! How can I save the ...

Get objc_exception_throw when setting cookie with ASIHTTPRequest

I got objc_exception_throw when trying to set cookies for a ASIHTTPRequest request. I tried both of these but it didn't work out. ASIHTTPRequest *request = [[ASIHTTPRequest alloc] initWithURL:url]; NSMutableDictionary *properties = [[NSMutableDictionary alloc] init]; [properties setValue:@".google.com" forKey:@"Domain"]; [properties ...

iphone development

Hi I want to play pls file from iphone application. The url for that is "http://yp.shoutcast.com/sbin/tunein-station.pls?id=4512", Please help me how can I play this file from iphone application. Thanks in advance. ...

Xcode Windows Problem !

Hi everyone, I am facing a strange problem . When i single click on my files in the left pane of Xcode window. The file doesnt automatically show on the right pane. I have to double click on my classes files or resources files to open them . It was working fine since yesterday. Does anyone has any idea wats wrong? ...

Is there a way to fix the background image of a UITableView

Hi I have set the background of my UITable with a custom image. self.tableView.backgroundColor = [UIColor clearColor]; self.tableView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"background.png"]]; The problem I'm having is the background image is scrolling and doesn't look good at the top and bottom of the ...

initializer not constant?

Quick question if I may: I am just curious about the following (see below) Xcode says "initializer element is not constant" why this does not work, I guess its the NSArray ... static NSArray *stuffyNames = [NSArray arrayWithObjects:@"Ted",@"Dog",@"Snosa",nil]; and this does ... static NSString *stuffyNames[3] = {@"Ted",@"Dog",@"Snosa...

iPhone/iPad Pan, Pinch and Rotate a view simultaneously

I'm trying to recreate the behaviour of the photos app, where you can pan, pinch and rotate simultaneously. I have the basics working, but I'm stuck on something. For the pan, I offset the centrepoint of the view by the translation amount. This is working well. For the pinch and rotate I'm applying an affine transform to the view. This...

Trouble correctly formatting NSString for JSON.

Having a little trouble processing my NSStrings into a valid JSON string. NSString *version = @"1.1"; NSString *callMethod = @"auth.login"; NSString *paramsConfig = [NSString stringWithFormat:@"{\"email\":\"%@\",\"password\":\"%@\"}", usernameString, passwordString]; int queryId = arc4random()% 10000000; NSDictionary *us...

How to get a reference to a method's caller object from within the method in Objective-C

Hi guys. I have a few text fields and text views on my application's view. The keyboard comes up when I click in anyone of them. I have a method that gets called when any one of these objects is tapped in. However, I would like the method to execute its code only if the a certain Text Field(s) or a certain Text View(s) is tapped in. I wo...

iPhone : is javaScript runnable in UIWebView ?

Hi, Experts i want to change image periodically in UIImageView in my Application. and image will come from web. can i run javaScript enable page in UIWebView ? is it possible to do ? or any other way to implement this ? any code snippet if awailable... waiting for you reply... thanks in advance. ...

Core data setReturnsDistinctResult not working

So i'm building a small application, it uses core data database of ~25mb size with 4 entities. It's for bus timetables. In one table named "Stop" there are ~1300 entries of bus stops with atributes "name", "id", "longitude", "latitude" and couple relationships. Now there are many stops with identical name attribute but different coordi...

Add new language to existing Xcode project localization

Hey guys, I'm working on an existing Xcode 3.2.2 Universal iPhone OS project which is already localized for 4 languages (EN, IT, DE and FR). We are now adding a new language (JA) into this project. Each existing .lproj folder (en.lproj, it.lproj, de.lproj and fr.lproj) has almost 60 files - including PNGs, HTMLs and the Localizable.str...

Preprocess strings file during Xcode build

Hello, I know there's a way to preprocess my info.plist file, but is there a similar way to process strings files inside my Settings.bundle? My problem: I have an iPhone app and I want the the user to know about the currently installed version. I do this by displaying it in the apps settings. Now every time i change the bundle version ...

Drawing a route in mapkit in iphone sdk

Hello, I want to draw a route between 2 locations on the map.. something as a tour guide.When the tourist clicks another location i want to be able to draw the route as well as inform the distance from current location. I am aware of sites on the internet which tell how to draw polylines on map. But,one such example had a preloaded .cs...

How to animate the change of image in an UIImageView?

I have an UIImageView with an image. Now I have a completely new image (graphic file), and want to display that in this UIImageView. If I just set myImageView.image = newImage; the new image is visible immediately. Not animatable. I want it to nicely fade into the new image. I thought maybe there's a better solution than just creat...

How to collapse all methods in XCode?

Hi! This is simple: Does anybody knows how to collapse all methods in a class in XCode? Collapsing one by one is not an option anymore =D Thanks and have a nice day! ...

Can I access the keychain on the iPhone with MonoTouch?

Hello, I have recently started to develop applications for iPhone with MonoTouch and have to store user names and passwords on the phone. I want to use the keychain for this but can't find anything in the MonoTouch documentation about it. Is it possible to use it directly with MonoTouch or will I have to write some C++/C/Objective-C code...

iPhone: Cell imageViews repeating when loaded from url

I'm developing a demo RSS reader for iPhone. I obviously have a tableview to display the feeds, and then a detailed view. Some of this feeds have a thumbnail that I want to display on cell.imageview of the table, and some don't. The problem is that when scrolling the table, loaded thumbnails start repeating on other cells, and I end up ...