iphone

Import Header-File depending on the target name in Xcode

I have a preprocessor constant called TARGET_NAME holding the current target name. I want to import a certain header file depending on the target name, e.g. include "App-Config.h" when TARGET_NAME is set to App-Config. How am I going to achieve this? ...

Saving data when navigating

how can i save the data in from texfield when i navigate back to previous view? i have set the app to save all data to plist when terminate but i when i am navigating up and down view, i need to save the data to some place. any suggestion? save data when "back" button at nav bar is press? but how? save to NSUserDefaults? ...

How to control treble, bass, volume on Iphone/ipad

Hello I need some help/hints on how to control the ipad's volume, how to control the bass and treble in xcode for an iphone app. Thanks ...

scheduling task in iphone

Hi all, I am developing an iphone app, there's a section in it where user can declare his task and its occurence in time. I.e. recursive task. The task will only show an alert box and nothing else when its due time. Its a kind of reminder, rather than a real task scheduler. What's the best way or technology to achieve that with objecti...

How to pass NSManagedObjectContext back up to root view in UINavigationController?

I may just be passing data between views completely wrong here, so I am open to completely changing how I pass my data back and forth. My app delegate creates the NSManagedObjectContext and passes that to my main menu using a UINavigationController which makes it the root view: MainMenuViewController *mainMenuViewController = [[MainMen...

Handle Ongoing UIView-Animation during Device Rotation

I've got quite a few UIView-based Animations going on most of the time in my app. I want to be able to handle all device rotations, but it's always a performance hit when you trigger the device rotation when there's already an animation going on. I wonder what's the best practice for cases like this? Shall I subclass all my UIView elem...

Problem uploading to FTP using S7FTPRequest

Hello, I'm trying to use S7FTPRequest to upload files to an FTP server: S7FTPRequest *ftp = [[S7FTPRequest alloc] initWithURL:[NSURL URLWithString:@"ftp://ftp.abc.com/aaa/files/"] toUploadFile:[[NSBundle mainBundle] pathForResource:@"info" ofType:@"plist"]]; ftp.username = @"name"; ftp.password = @"pass"; ftp.directoryName...

UIApplicationExitsOnSuspend anything else I'm missing?

So I know this has been beaten to death but I still can't figure out a solution. I have my UIApplicationExitsOnSuspend set to <true/> in the Info.plist and still both in the simulator as well as on an iPhone 4 device, the app goes into standby instead of terminating? Any ideas of what else could one do to get it to terminate? Perhaps ...

Stop animation at current image

hi, I have an image that is animating, until you press the button that says "Stop". The code works and all, but the image returns to the first image in the array. How can i add a code to tell it to stop at the image it's currently at? - (void)viewDidLoad { [super viewDidLoad]; imageView.animationImages = [NSArray arrayWithObj...

iPhone uiwebview PDF images problem

Hi, I am having a trouble for my first app, i am using UIWebView to display a local pdf file for my apps, but when I use my iPhone simulator to open the apps, I find all the images is missing. the pdf file is around 50mb. There is the code I used (void)viewDidLoad { [super viewDidLoad]; pdfURL = [NSURL fileURLWithPath:[[NSBundle main...

How to setup normal Icon for iPhone3 and Retina for iPhone 4

I heard somewhere of an workaround by adding the following files to your xcode project: Icon.png - 57x57 pixels application icon for standard resolution iPhone [email protected] - 114x114 pixels application icon for high resolution iPhone 4 Icon-72.png - 72x72 pixels application icon for iPad Icon-Small.png - 29x29 pixels settings icon for s...

How to implement zoom on doubleclick in webview in iphone?

Hello I have loaded a HTML page in a web-view.But on double click of the web-view its not zooming.I have also set the "scalesPageToFit" property to "YES" also ,but i am not able see the zoom effect in web-view. CGRect webFrame = CGRectMake(0, 0, 320, 480); webView = [[UIWebView alloc] initWithFrame:webFrame]; webView.backgroundColor ...

AppStore Tax information for UK developer

Hey, I've been reading about the Apple withholding a 30% tax on the revenue until you fill out a W8BEN tax form. This isn't very well documented and as I've only just read about this, I'm starting to think I'm going to lose out on my previous sales. If you're from the UK (like me) and are a sole trader, how do you go about avoiding thi...

How do you implement seeking using the AudioStreamer sample application as a base?

I need to play some audio streaming contents on iPhone, but there are some options and problems I can't solve: 1. http://cocoawithlove.com/2009/06/revisiting-old-post-streaming-and.html It is a library provided by Matt Gallagher, but I saw the Limited scope, and I would play a single song, not a radio station. 2. Suggestion from z...

UIView Background Image with a Tab Bar & Navigation Bar

In my iPhone application I have the a Default.png image that appears when the app is loading. When my app is loaded the first view that appears is embedded in a Tab Bar Controller and a Navigation controller. I have an UIImageView on the first view that you see - basically I would like to keep it that the ImageView image stays in the exa...

Why won't my [iPhone] location aware notifications trigger?

I've got an iPhone app that's location aware (well, I'd LIKE it to be! ;) but, for some reason, the location notifications never fire. I'm pretty good with iPhone SDK (30+ yrs dev, iPhone since day-1), and I thought I followed all of the documentation and samples to set everything up correctly. However, when I set it to notify when I e...

How to save array to NSUserDefaults?

I would like to save an array of view controllers in NSUserDefaults, but I am not sure how: [[NSUserDefaults standardUserDefaults] setObject:tabBarController.viewControllers forKey:@"tabOrder"]; When I read the above line, my tabBarController.viewControllers is blank. ...

Comparing Two Strings

I am using isEqualToString to compare two strings? as follows: if ( [ somethingString isEqualToString: @"MyString" ] ) { //do something } else { //do something else } Now, I have examined somethingString with NSLog and it appears ok in that it shows what I expected. But, the if statement is not working. I am thinking that ev...

How do you reference a textfield on a different view?

Hi, I have view 'A' which has a number of textfields. Pressing a button on view 'A' brings up view 'B' (with a picker to select multiple data). On close, view 'B' disappears and viola, the textfields are populated. This should be straight forward solution but I can't seem to get my head around the problem - how do you reference the tex...

iPhone Development - What can be done about this memory error:

Dual Search(8896,0xb014b000) malloc: *** error for object 0x5a1e0f0: pointer being freed was not allocated *** set a breakpoint in malloc_error_break to debug Thanks! ...