iphone

How can the accelerometer be used in a controller with a seperate view?

I am trying to get the accelerometer to detect shakes in a separate view and the accelerometer method does not get called? When I place code to set the accelerometer attributes in the controllers viewDidLoad method and add the ......didAccelerate:(UIAcceleration *) acceleration in the implementation file for the controller shakes are de...

How do you return to my iphone app after a call has ended?

My app initiates outgoing phone calls, which works fine but I want the user returned to the app after the call. I am aware that changes in iPhone OS 3.1 broke this behaviour from being automatic, but it makes sense in the case of my app, especially if the user initiated the call from withing my app. I have other apps which do this so it...

JavaScript Error line 1 <ANYJAVASCRIPFILE.JS> SyntaxError: Parse error IN Iphone mobile safari

Hi, I keep getting this error when I run my web app (asp.net mvc) in the mobile safari (ITouch) JavaScript Error line 1 SyntaxError: Parse error JavaScript Error line 1 SyntaxError: Parse error I have no problem running this in any other browser (including safari). I suspect this is something to do with mobile safari handling...

Push Notification Strategy for App using the Urban Airship service (iPhone)

Hi I am building an app that uses the fine Urban Airship api to send the user push notifications. The app keeps track of event dates that are added to the app by the user. This means I have no server in place for dealing with push, the app itself simply schedules a push notification with Urban AS when the user add the event date and t...

iPhone and Android GPS coordinates in PHP

Hello everyone, I'm am curently doing an application with Google Maps, where I am checking the position of the user with the javascript API, but I would like to know if there is a way to check the GPS variables in a PHP file ? Some kind of GET parameter, but it seems nothing like that exists. ...

Editing and iPhone SDK Framework ?

I am working with MapKit and want to be able to add a (NSString *)itemTag value to each of my annotations. I have created myAnnotiation.m and myAnnotation.h I tried adding itemTag to the myAnnotation.h/m but when I try to access currentAnnotation.itemTag within my main code, it says "itemID not found in protocols" - so I went to the Map...

How to set UIToolbar tint and maintain translucency like Black Translucent style?

I've attempted to set the tint of my UIToolbar in IB, but that always causes the color of the toolbar to become solid. Adjusting the opacity of the color doesn't "stick". Changing the opacity of the toolbar itself is not the effect I'm looking for. What I'm really wanting to do is get the same effect as the Black Translucent style ava...

Xcode/Instruments' "Gather leaked memory contents" gives me a useless hex-only dump

When using the "Gather Leaked Memory Contents" of the Leaks Instrument, it seems to give me only the hex contents of an object, rather than showing me the ASCII string beside it (like every other hex dump in the world ever). Worse still, this box is un-selectable, I cannot even copy it into a decent hex editor for a string view. Is ther...

iPhone XCode programming: execute code when change tab in a tab bar application

Hello! I'm developing a simple tab bar application for school. It has 3 tabs. One of them plays music in streaming and I would like to stop the music playing when the user changes the tab. Is this possible? and How? Thank you in advance! ...

how do i add two delegates to a ui element at run time?

Hi everyone, im trying to implement some behaviors when a mapview element scrolls... by coding a delegate for the scrollview inside of a mapview. so, right now, i got a pointer to the scroll view used by the map view in my code. however, i wish to set the delegate of this scroll view inside the map view, but the issue is that the ...

writing NSDictionary to plist in my app bundle

Hi I'm trying to write an NSDictionary to a plist but when I open the plist no data has been written to it. From the log my path looks correct and my code is pretty standard. Any ideas? NSArray *keys = [NSArray arrayWithObjects:@"key1", @"key2", @"key3", nil]; NSArray *objects = [NSArray arrayWithObjects:@"value1", @"value2", @"value3...

How do I overheat my iphone by running multiple processes in code

I saw some handwarmer apps and I guess it's very easy to make something like that by running multiple processes at once. Has anyone had a go on it? If you did, can you share it with us here? Thanks ...

iPhone - how to pass an object to a button action

I have to pass an object to an button's action... something like [myButton addTarget:self action:@selector(sendIt:MY_OBJECT) forControlEvents:UIControlEventTouchDown]; I cannot set a variable and use that on the method because I am on a static class. How do I do that? thanks for any help. ...

Calling a UIApplicationDelegate method from a UIViewController

I have a simple iPhone application that is very similar to the Page Control example provided by Apple. It creates a group of UIViewControllers dynamically, then adds them to a ScrollView. When a button is touched on one of these views, I need to be able to call a method back in the UIApplicationDelegate. It will then do some calcula...

How to pass the equivalent of nil for an (NSError **)

I have a method that takes an (NSError **) but I don't want to pass it one. When I pass it "nil" or "NULL" I end up with "EXC_BAD_ACCESS". The offending line is "*error = nil;" How do I pass it the equivalent of "nil" without crashing? ...

Ho to get month/weekday symbols from NSDateFormatter in current language (iPhone)

In particular I'm interested in shortStandaloneWeekdaySymbols. I'm using this code: NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; NSArray *shortWeekdaySymbols = [dateFormatter shortStandaloneWeekdaySymbols]; But if iPhone region format is set to US but language to French/German/any other, NSDateFormatter returns Eng...

Developing Mobile App (Iphone,Blackberry,Android) for an existing website

Hey Guys I have a website and am planning to develop a mobile version of it for the iphone, blackberry and android. My website is a social network built on PHP Zend framework. Now all these mobile apps are going to be having the same functionality like the website. I am little ignorant about this - but from a high level I understand t...

Touch area changing on custom UIButton with image and title on landscape mode

hello all I'm trying to build a button that looks like the icons on the iphone , with an image and a title bellow.I'm working in landscape mode. I have a custom button on the IB with image and title and inside the code I use the methods : [aButton setTitleEdgeInsets:UIEdgeInsetsMake(60.0, -50.0, 0.0, 0.0)]; [aButton setImageEdgeInsets:...

indentationLevelForRowAtIndexPath not indenting custom cell

I have overridden the tableView:indentationLevelForRowAtIndexPath method in my UITableViewController derived class as follows: - (NSInteger)tableView:(UITableView *)tableView indentationLevelForRowAtIndexPath:(NSIndexPath *)indexPath { NSDictionary* item = [self.projects objectAtIndex:indexPath.row]; int indentationLevel = [[ite...

iPhone: scroll view with arbitrary page/"settling" boundaries?

Hi all, I'm trying to figure out if I can get what I want out of UIScrollView through some trickery or whether I need to roll my own scroll view: I have a series of items in row that I want to scroll through. One item should always be centered in the view, but other items should be visible to either side. In other words, I want normal s...