iphone

Terminating app due to uncaught exception

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '* -[NSKeyedUnarchiver initForReadingWithData:]: incomprehensible archive (0x4e, 0x49, 0x42, 0x41, 0x72, 0x63, 0x68, 0x69)' 2010-09-03 16:58:20.522 CHI[1843:20b] Stack: ( 807902715, 2481118779, -(void)loadView { [super loadView]; [self text...

How to send a time-delayed message to a UIView on a timer

Hi, I am adding UIViews to a superview in the following loop: int xValue = 0 ; int yValue = 10; for (NSString *element in characters) { UIView *newCharView = [[MyChar alloc] initWithFrame:CGRectMake(xValue,yValue,100,100)]; [(MyChar *)newCharView initLayers:element]; [[self view] addSubview:newCharView]; [newCharView au...

UIScrollView "back to original size"

I have a UIScrollView which has a UIView embedded in it. It scrolls up from bottom on a buttonClick, the button is located in another view. When it scrolls up it partly covers the calling view i.e view on which the button is located. Now, I have another button that is supposed to push this scroll view down. This button doesn't seem to be...

Changing interfaceOrientation based on image dimensions

I'm looking to change the phone's rotation based on the size of an image. is there a way to detect if the image has 480px x 300px dimensions then use landscape rotation and vice versa? I have many photos some of which are best view landscape and other best viewed in portrait mode. thanks for any help. ...

intermittent "No Route to Host" on iOS, flight mode off then on fixes

Hi all, My iPhone app uses UDP to communicate over the cell network. It generally works, except that sometimes the operating system returns "No route to host" (65) on a sendto call, and it never works from that point onwards -- I just keep getting same error, even if I close and reopen the app. However, if I toggle flight mode (presum...

How to make UIView animation callback on reverse?

I've been trying to make a short animation that reverses halfway through with a static method that can be called by my view controllers. This works fine. But I need it to perform a selector when the reverse takes place, essentially in the middle of the animation. The method setAnimationDidStopSelector only fires when the entire animati...

Why isn't UINavigationController popping UITableViewController when I touch the back button?

The navigationBar goes back, but the view stays the same. What gives? ...

How to get screen size using code?

Hi everyone, I would like to get the iphone screen size to give calculation, but I did not found any documentation how to get it. Would you please figure it out for me? Thanks ...

How many windows does an iPhone application typically have?

Hi All, Just want to know how many windows does an iPhone application typically have? Thanks Saurabh ...

use two different uitab bar in application

Hi, I want to use two different uitabbar control in the application. first UITABbar control i add in the starting windows. and in this after the navigation i want to show the other tab bar with 5 tabs. can any one suggest how i do this ? Or we need to add a different window for add this and need to show this windows on the click or other...

Practical efficient usage of IBOutletColletion

How does look the practical usage of IBOutletCollection? Unfortunately Apple documentation mentions it briefly without giving an wider idea of usage. OK, it maintains one-to-many relation with IB, but how to access and use particular objects efficiently? With TagName? How to ensure the order of objects? ...

play audio from internet using AVAudioPlayer

Hey all, I am implementing AVAudioPlayer to play audio and it works perfectly well while playing files locally stored in the PC. But when i give the url of some audio file over the internet, it fails sadly. Here's what the code looks like: NSString *url = [[NSString alloc] init]; url = @"http://files.website.net/audio/files/audioFile.m...

UIApplicationDelegate messages and performSelectorOnMainThread

Hi there, i wrote an app for iPhone (iOS3) and everything seems to work great except UIApplicationDelegate messages when i start a thread with performSelectorOnMainThread. I have a long task(app. 5min) and i want to execute this task. But when i do this, it seems that my AppDelegate doesn't receive the messages like applicationWillResig...

How would you build iPhone apps without the use of the iPhone SDK?

If you wanted to avoid the agreement to use the iPhone SDK, you'd have to not use it. ...

Store preferences in a file and import values to initialize variables

Hi, I want to store the content of some variables in a file. The user nor the application should change the value. It would be great if the user cannot read the content of this file. On startup the application reads the file and initialize some (global?) variables with the content. The file should contain some values like server URL an...

set minimum date for UIDatePicker

ive a scenario where the user selects a starting and ending date using UIDatePicker.I want to set the minimum date of the picker as the starting date set by the user after he selects the starting date.I tried 'setminimumdate',but that doesnt work.Any other methods?? ...

How to perform unit testing & white box testing for an iPhone application for Simulator and device both ?

Hi, i need to perform unit testing and white box testing for an iPhone application (for simulator and device both). Which is the best & free open source unit testing tool for an iPhone application to perform unit test and white box testing ? ...

sqlite database not updating modified data in iphone sdk

Well i am new to iphone coding and using sqlite in one of my application the problem is my sqlite database does not updates the modified data, i am following a sqlite based tutorial: this is what i am doing:- - (void) saveAllData { if(isDirty) { if(updateStmt == nil) { const char *sql = "update Work Set Engagement = ?, Status ...

Database changes after App is in store

Folks, I just have a quick question about updating my app after it is in the store. If I want to add an attribute to an entity in Core Data would I have to create some sort of conversion process. Regards, Stephen ...

iPhone API: newbie questions on the HelloWorld sample

Just getting started on iPhone dev today and have run through Apple's HelloWorld tutorial: http://developer.apple.com/iphone/library/documentation/iPhone/Conceptual/iPhone101/Articles/02_CreatingProject.html#//apple_ref/doc/uid/TP40007514-CH3-SW3 Couple of easy questions for you folks (sorry so long-winded but I'm hunting around in the...