iphone

Calling NSXMLParser based on navigation direction

I have an navigation-based app with three view controllers. The first has categories of information, the second has a list of items from that category and the third has detail on a specific item. I populate view controllers 1 and 2 using an NSXMLParser which gets called on viewWillAppear. In the forward (VC1 to VC2 to VC3) direction, ev...

How can I get my Facebook app users to change their settings?

The default settings for which information friends can share does NOT allow friends to grant an application access to "interested in and looking for" and "religions and political views". Most Facebook users have not changed these settings, meaning that only the users that have explicitly allowed friends to share interested in informatio...

Using UITapGestureRecognizer

New to iPhone dev. I have a view which contains a UIScrollView which contains a UIImageView. I added a (double) tap gesture recognizer on the image view which makes an alert box open. For some reason, and I'm sure I'm just retarded, it opens 3 times. Here's my code: - (void)viewDidLoad { scrollView.delegate = self; UIImage* i...

Compile PHP with GD for iPhone OS 4.1

The Goal: have a working version of PHP with the GD library working on an iPod Touch 4th Gen. The Status: PHP is working on the iPod (lighttpd + PHP 5.2.8 + sqlite3) without GD. When trying to compile PHP on the iPod I get this error: http://pastebin.com/kUmgq70G The Proposed Solution: Can anyone point me in the direction of how to...

reloading a tableview when source is NSURLConnection and gets new data

I tabController app with uitableview getting NSURLconnection data and trying to display it. I can't figure out the issue. If I replace the connection with an array I'm storing all the drill-down works, but updating doesn't, So I think that the tableView end of things is fine. BUT: If I put [[self.tableview] reloadData]; in the -(void) ...

How can I invite other Facebook users to my iPhone app with extras?

If I want to get information about a user's friends in an iPhone app that integrates Facebook SDK, how do I ask the user to invite their friends to use the app and once the friend accepts the invite to ask those people to provide the "user_relationship_details" permission? In other words, what code or methods do I use? ...

Get direction UIWebView is scrolling

Hey! I need to find a way to keep my page's bounce scrolling looking good. Here's what I need: When the user scroll past a UIWebViews scrollable area (top), the background color of the view should be set to [UIColor colorWithRed:0.839 green:0.871 blue:0.871 alpha:1.000] and when the scrollable area is drug too far on the bottom, the c...

Detecting JavaScript errors in a UIWebView

I'm running into a very annoying issue developing javascript for a UIWebView in an iPhone application. If there is an error in the javascript, it silently fails and halts execution of the function it was running. And some errors do not happen in a desktop browser, so all appears fine. I then run it on an iPhone and get a massive failu...

XCode 3.2.4 Project - no "other linker flags" in build settings visible

Hello, I am recently trying to connect my cocos2d game with open feint, but I can't accomplish it as there seem to be some settings missing in my build settings of any project that I create. For example, I have to check "Call c++ Default ctors/Dtors in objective c", but there isn't such an option in my build settings. What's wrong wi...

Objective C Json not working in viewDidLoad

NSString *navTitle = self.navigationItem.title; NSURL *address = [NSURL URLWithString:[NSString stringWithFormat:@"http://www.twostepmedia.co.uk/json.php?q=%@",navTitle]]; responseData = [[NSMutableData data] retain]; NSURLRequest *request = [NSURLRequest requestWithURL:address]; [[NSURLConnection alloc] initWithRequest:request deleg...

Google Map V3 not centering, displays only part of map

Hi, I'm developing a jQTouch-based app for the iPhone and part of it uses the Google Maps API (V3). I want to be able to pass the geolocation coordinates to the map and have it center the location with a marker. What I'm getting now is the map at the proper zoom level but the desired center-point appears in the upper-righthand corner. ...

Making deep copy of UIImage

My class contains an UIImage property which I want to enforce as a 'copy' property by any external clients accessing it. But, when I try to do a copy in my custom setter, I get the runtime error about UIImage not supporting copyWithZone. So what's a good way to ensure that the correct ownership policy is followed? // declared in the int...

Is it possible to launch an iPhone app from a text message?

This question: http://stackoverflow.com/questions/2228982/launch-iphone-app-from-link-in-email suggests that it's possible to launch a particular iPhone application from a link in an email. Is it possible to include an app-launching link of this type in a text message, so that the reader has the option of pressing it (and launching th...

iOS - NSNotificationCenter memory leak

Instruments reports this a memory leak (98.6%, whatever that means): [[NSNotificationCenter defaultCenter] postNotificationName:kNotificationSomeNotification object:self]; "self" is a subclass of UIImageView. Is including "self" in the notification causing a memory leak? If so, how do you resolve it? ...

How can I continue to receive console information sent via NSLog() after I push an app into the background?

When debugging crashes and errors, the NSLog() function is incredibly useful, even vital. Unfortunately, some errors can provoked by pushing an app to the background, and that same act 'cuts' the ability to receive NSLog info, which makes debugging crashes related to moving an app into the background very difficult. How can I get NSLog...

Using Google TrafficLayer API?

Anyone have an idea of how to use Google's TrafficLayer API? Looks like it's Javascript only. Any idea how to use/convert output to Array for use with MKMapView? Haven't really used it. http://code.google.com/apis/maps/documentation/javascript/overlays.html (do find on the page for trafficlayer) ...

How to reset iPhone view as if I was entering it for the first time.

Hi, I have made a Tic Tac Toe game. Everything is working fine, except that when the game is finished I am unable to reset the view to it's original state (without popping the view of the navigation stack and popping a new one back on). I have reset the model, but how do I then reset the view? People are pretty on the ball here, so I t...

Can I update existing apps in the app store if I have rejected my distribution certificate because I lost my private key?

I have done A LOT of looking around on the internet and just cannot find the answer to this question. I lost my private key, and so I have rejected and re-assigned new certificate/key combo, but am having issues submitting app updates to apps signed with the old key with my new key. Is it possible to update an existing app with a newly ...

Get String Between Two Other Strings in ObjC

I am trying to parse a string and get another string in the middle. ie. Hello world this is a string I need to find the string between "world" and "is" (this). I have looked around but haven't been able to figure it out yet, mainly because I am new to Objective C... Anyone have an idea of how to do this, with RegEx or without? ...

Using NSTimer close UIAlertView

Hello everyone I hope to use an UIAlertView prompt to reminder user some messages, the alerview will be closed automatically in 2 seconds. my codes: IBOutlet UIAlertView *aUIAlertView; .... @property (retain,nonatomic) IBOutlet UIAlertView *aUIAlertView; .... UIAlertView * alert=[[UIAlertView alloc] ...