iphone

Javascript in UIWebView callback to C/Objective-C

Is there a way to get a callback to objective-c when a certain event has been detected in a UIWebView? Can Javascript send a callback to Objective-C? ...

New added color in my iPhone application stop syncing it from google calendar

I am developing a application for iPhone with the syncing feature for google calendar in it.what i am doing is that ,I add some new color in my app.Now i launch the app and assign the new color to the events and sync it with google ,but the application does not sync and give error messages that color is invalid.I want to know that ,is t...

Selected state of custom UITableViewCell

I've got a table with custom cells brought in from an IB file. Cell is created like this: - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *MyIdentifier = @"MyIdentifier"; MyIdentifier = @"BasicCell"; BasicCell *cell = (BasicCell *)[tableView dequeueR...

What are the pros and cons of using AppCelerator versus Objective-C

What are the pros and cons of using AppCelerator versus Objective-C ...

Help: List contents of iPhone application bundle subpath??

Hi, I am trying to get a listing of the directories contained within a subpath of my application bundle. I've done some searching and this is what I have come up with - (void) contents { NSArray *contents = [[NSBundle mainBundle] pathsForResourcesOfType:nil inDirectory:@"DataDir"]; if (c...

Touch events are not triggered on video tags on safari for iPhone

I want to prevent the scrolling on a safari web page for iphone by binding the preventDefault method on the document element of the DOM, and it works on every elements but the video tag. document.addEventListener("touchmove", function(e){e.preventdefault();}, false); I've tried attaching the event to the video tags, but it seems as if...

Outputing struct to NSLog for debugging?

I am just curious, is there a way to print via NSLog the contents of a struct? id <MKAnnotation> mp = [annotationView annotation]; MKCoordinateRegion region = MKCoordinateRegionMakeWithDistance([mp coordinate], 350, 350); I am trying to output whats in [mp coordinate] for debugging. . EDIT_001: I cracked it, well unless there is a...

401 Unauthorized using oauth with twitter on iPhone

I use Twitter-OAuth-iPhone. http://github.com/bengottlieb/Twitter-OAuth-iPhone/ when i try to login on twitter with SA_OAuthTwitterEngine, I received an error 401 i received the delegate call for - (void) OAuthTwitterController: (SA_OAuthTwitterController *) controller authenticatedWithUsername: (NSString *) username { but when i tr...

App store name and info.plist

Hi guys, I've just completed my first app and having tested I'm ready for submission. However, despite numerous web searches and reading, I'm struggling to finalise the method required to enable me to have a different name on the app store to the name that appears under the app on the device home screen. In the plist.info file there i...

UIButton stops responding after going into landscape mode - iPhone

I've been trying different things the last few days and I've run out of ideas so I'm looking for help. The situation is that I'm displaying my in-app purchasing store view after the user clicks a button. Button pressed, view is displayed. The store shows fine. Inside this view, I have a few labels with descriptions of the product, and th...

iphone memory leaks with CoreData

Hi all, I was checking my app for memory leaks using instruments and I got the following NSConcreteMutableData GeneralBlock memory leaks.When I checked it was from the following code. NSError *error = nil; if (![[self fetchedResultsController] performFetch:&error]) { NSLog(@"Failed to load data : %@", [error localizedDescript...

iPhone Daemon Processes and UIApplication's openURL

I have a daemon process which I created running on my iPhone (so yes it is jailbroken). I have been able to use the Audio and CoreLocation frameworks without problems. However when I try to use NSURL *url = [NSURL URLWithString:@"astraproto://hi"]; [[UIApplication sharedApplication] openURL:url]; it just doesn't open. The protocol is...

How change a CGContext attribute after drawRect is carried out

Hi, I draw a path using CGContext. How can I later change one of the path attributes after drawRect was carried out (completed)? I want to be able to change the color of my path according to a slider value. ...

iPhone App with Thirdparty Code - License Question

What do I need to include if my iPhone App uses some third party code under an opensource licence for example BSD or MIT, before submitting for AppStore approval? Is it enough if I let original code with it's comments untouched or do I need to include a readme file where I describe that I used "xyz's framekwork under licence abc" or som...

Multiple View App shows Blank Screen in Simulator

Hello; I am developing a simple app that first shows a menu screen, and when a button is pressed, a game screen appears. I was able to develop the game screen without any issues, but when I changed the code to first display the menu, the simulator showed a blank screen. I've read all the articles on connecting views with IB but I can't...

Setting delegate property without IB

Does anyone show how to set the delegate properly for this without interface builder? http://www.gauravv.com/2009/12/29/iphone-development-tip-custom-uinavigationbar/ ...

Mobile Specific Site Development. Where to start?

I'm beginning the process of learning the ins and outs of developing sites for mobile web browsers. Are there any good resources/communities online that discuss mobile specific site development issues? My initial understanding is that to cover different phones you need to build one site that is enabled for browsers with the webkit engi...

Can tapping next textfield trigger same behavior as "Done" key?

I've got two textfields in a row for username and password. When you're finished putting in your username, the most natural thing to do is to just tap on the next textfield, like you would with a web form. But that doesn't work -- you can't edit the next field until you press "Done" on the keyboard for the first field and then tap on t...

Changing a custom accessoryView in a uitableviewcell?

I'm trying to change the custom accessoryView of a uitableviewcell immediately after the user clicks on the cell. How would I do this? For the record, I'm using Matt Gallagher' custom table view tutorial: http://cocoawithlove.com/2009/04/easy-custom-uitableview-drawing.html Download link for source: http://projectswithlove.com/project...

How to add button to UINavigationController.

I have the following code with adds a navigation controller to a modal view. The nav bar and view all appear ok, but the right button does not. What am I doing wrong? UpgradesViewController* upgradesViewController = [[UpgradesViewController alloc] initWithNibName:@"UpgradesView" bundle:nil]; upgradesViewController.title = @"Upg...