iphone

UIWebView alert not display page URL?

I am using a UIWebview in my app, and when there is an error, it displays an alert message. The message is fine, but the title of the alert message displays the page URL, which doesn't help. Anyway to get rid of that and display a custom text instead? Thanks for your help. ...

Moving 3D objects in iphone

Hi, I'm a beginner to the iPhone development. I need some example source code or idea about moving 3D objects in iPhone gaming application. Thanks Khushi ...

Crash-proof NSDictionary

Hi, I'm looking to create a "crash-proof" NSDictionary as I'm using a JSON serializer that converts a server response into an NSDictionary. As as result, sometimes the key for the dictionary is not present. Currently, this will crash the application, however I'd rather an empty NSString was returned so I can display this in the interfac...

Keep an NSThread containing an NSTimer around indefinitely? (iPhone)

Hi I have some web service data in my app that needs to be updated every 3 minutes. I had tried out a few approaches but got a really good piece of advise in here last week, I should not build a new thread every 3 minutes and then subsequently try and dealloc and synchronize all the different parts so that I avoided memory bug. Instead ...

How to Add a Splash Screen or Initial View to the Xcode iPhone Utility Template

I have made an application using the utility template. I want to add one more view when the application launches (like a splash screen.) In this view, I have three buttons. When I press one of the three buttons, the main view of the utility templete will be load. Please help me if possible send code..thanks in advance ...

Iphone static libraries problem

Hello i am making an static library for distribution. I am distributing the .h files and the .a file. The problem is that if there is a runtime error, the debugger is able to see the content of the .m files. How can i avoid that? ...

UITableView Crashes if Data Source Is Updated During Scrolling

I have an app wherein the datasource for a UITableView updates by a background thread from a remote server every 30 seconds. A crash occurs if the user is scrolling the tableView or if the tableView is in process of reloadTableView:. The reason for crash is that number of rows in table at the time of the crash doesn't match the number o...

How to get the Device UUID on the Simulator?

Calling [[UIDevice currentDevice] uniqueIdentifier] returns nil and "unable to determine UUID for host. Error: 35" message in the console. Where is the UUID stored on the simulator? ...

How do I make a UITableView that remembers it's row names

I have a UITableView that I am allocating multiple times during the lifetime of my app, I want the names of the rows to stay in scope. What is the most memory efficient way of doing this. ...

UITableView orientation

I have a class that inherit from UITableViewController, the only orientation allowed is UIInterfaceOreintationPortrait. In this class I'm using the delegate method didSelectRowAtIndexPath: to push another view in which landscape orientation is allowed. The problem is that when I came back from this view in landscape orientation, the Tabl...

CLLocationCoordinate2D to CLLocation

Hello users, i have the following loop in my viewDidLoad: for(int i=1; i<[eventsArray count]; i++) { NSArray *componentsArray = [[eventsArray objectAtIndex:i] componentsSeparatedByString:@","]; if([componentsArray count] >=6) { Koordinate *coord = [[Koordinate alloc] init]; coord.latitude = [[componentsArray objectAtIndex...

How do I access UIImageViews that have gone outof scope and that shares the same name as multiple others

I have a for loop that creates multiple UIImageViews that I add to self.view I do this in my custom init method. - (id)init { if ( self = [super init] ) { for ( int i = o; i < [count]; i++ ) { //count is a variable I am using (typicly 3) UIImageView *tmpImageView = [[UIImageView alloc] initWithImage[data getImage]]; ...

Objective-C: addTarget:action:forControlEvent for subview button

I'm doing an iPhone ap which contains a viewController class (PhotoListViewController). This viewController's view has a subview which contains a button attached as a subview. I'm trying to use the addTarget:action:forControlEvent method to call an instance method of the PhotoListViewController class in order to perform an action when t...

How can I add a localised high score board to my app?

Hello everyone, I'd like to code a high score board for my application, can anyone advise the best way to do it? #import "MathsTestViewController.h" @implementation MathsTestViewController @synthesize theQuestion; @synthesize theScore; @synthesize theLives; @synthesize answerOne; @synthesize answerTwo; @synthesize answerThree; @s...

Can NSScanner parse via a set number of characters?

I have a pile of data in the format listed below that I need to convert from 2-digit hex to their respective integer values. Is there anything that I can specify to NSScanner that will take 2 characters at a time for conversion. Or will I need to either break the string up manually (e.g. "D8" "BE" ...) or reformat it to include a delimit...

how to adjust the horizontal gap between string with Drawing String Objects of NSString on iphone

Is there any api to adjust the horizontal gap between strings .I use the code - (void)drawRect:(CGRect)rect { hello =@"this is a test string string string string string string"; UIFont *hfont = [UIFont fontWithName:@"Arial" size:18]; [hello drawInRect:self.bounds withFont:hfont ]; } self is a uiview .it appear that ...

change the portrait to landscape and vice versa

Hi, I am new to iphone. I want change the view from portrait to landscape and vise versa depends upon device view position. In my app, I am using different kinds views, view controllers, table view controller, web view and so on. For achieve that where i want to put the shouldAutorotateToInterfaceOrientation method? is it necessary to ...

iPhone TabBarController - set selected tab programmatically

I have two tabs in my app, each of them is a UITableView, and each of the views in the two tabs has its own DetailViewController. Now, if I click on a TableViewCell in the DetailViewController in the first tab, I want to jump to the DetailViewController of the second tab. I know how to access the second tab self.tabBarController.se...

Can't connect to production Apple Push Notification server

We had no problem sending notifications to provisioned devices using the development certification and gateway.sandbox.push.apple.com. But now now that our app is in the store, it appears we can't even connect to the production apn server (gateway.push.apple.com) to send pushes, even when we're using the machines that created the certifi...

MIME parser for iPhone app

Hi, Can anyone recommend MIME parser for iPhone? My app should receive message in this format and parse the text and attachments. I found some open source libraries like libvmime but i run into compile problems on Mac/iPhone. Any idea is welcomed! Thanks ...