iphone

iOS4 SDK + Three20 Build issue

I installed the latest iOS4 SDK which replaced my existing SDKs (so I no longer have anything other than 3.2, 4.0). I also checked out the latest Three20 from github, and now whenever I'm about to Build a new Three20 app, or even run the samples I get the following error: Build Three20Core of project Three20Core with configuration Debu...

WebKit willExecuteStatement

Hey, I'm in WebKit setting my own script delegate using setScriptDebugDelegate. I'm trying to figure out what code is being parsed by the javascript interpreter in the willExecuteStatement function. How do I figure out what statement is being executed? Function prototype.. - (void)webView:(WebView *)webView willExecuteStatement:(id)fra...

NSTimer - Stopwatch

I've trying to create a stopwatch with HH:MM:SS, code is as follows: -(IBAction)startTimerButton; { myTimer = [NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(showActivity) userInfo:nil repeats:YES]; } -(IBAction)stopTimerButton; { [myTimer invalidate]; myTimer = nil; } -(void)showActivity; { ...

NSNotification when device time changes (minutes) ?

Is there a way I can easily set up a notification when the minutes change on the system time for iOS devices? I need to do some UI updates for time changes. I'd like the UI to update exactly on minute changes, not just every 60 seconds through an NSTimer trigger. ...

iPhone Custom Fonts with Font Suitcase

I am attempting to use a Font Suitcase for a custom font in an iOS4 app but am not having any success. I have read other posts that have documented how to use custom fonts, so have copied the suitcase into my project, added it to resources and the Info.plist ' Fonts provided by application' array, and attempted to use it both in Interfa...

When using the UIImagePickerController in iOS4 to pick from the photo library can you start w/newest first?

Is there a way to show the UIImagePickerController photo library interface such that when it comes up it starts at the bottom of the library which is where the newest images are in iOS4? Apparently this is how it worked in 3.x. Thanks ...

How to add a banner/image view on top of UINavigation Bar

I wanted to know if there's a way to add some sort of image view on top of the navigation bar. I don't want to cover it, rather, I just want to move the bar down in order to make room for a banner. The myspace app displays a bar right above their navigation bar, and so does the bank of america app. Any ideas? ...

Which conditional compile to use to switch between Mac and iPhone specific code?

I am working on a project that includes a Mac application and an iPad application that share code. How can I use conditional compile switches to exclude Mac-specific code from the iPhone project and vice-versa? I've noticed that TARGET_OS_IPHONE and TARGET_OS_MAC are both 1, and so they are both always true. Is there another switch I ...

iPhone: Code works in 3G but not 3GS

Hi all, I've got a REALLY strange problem - my testers report problems (app is hanging, not crashing) on 3GS, but NOT on 3G... this is the code where I'm assuming the problem: - (void)applicationDidFinishLaunching:(UIApplication *)application { NSSetUncaughtExceptionHandler(&uncaughtExceptionHandler); [FlurryAPI startSession:@"...

Confused about NSCFTimer... what is it?

Could someone tell me what exactly NSCFTimer is? I get it when I ask NSTimer for a timer. My problem is that I'm trying to check if an object (supposedly an NSTimer, note the word "supposedly" which is why I'm checking) is an object of class NSTimer, it doesn't seem to work. Does this "NSCFTimer" in any way... hinder the process? ...

Should I set up a protocol for Objective C array objects to avoid a compiler warning?

I have a class, let's call it ABC, with an NSArray *objects property, and the objects in the NSArray can be one of two different classes, X and Y. Both X and Y have a path property, but the compiler doesn't know this. Therefore, even though ABC will always find the path property on my array objects, I get compiler warnings on my code -...

Facebook Share can I add Alt text for flash videos?

You know with Facebook, how you can share video on your sites and Facebook embeds the videos via flash. Well on computers and laptop the embeded video will play on Facebook since they have Flash installed. But for iPhone and Android users will just be redirected to the site, I want to stop this and add an alt text stated something like ...

NSNumber weirdo .... ?

Hi, for a day now I stare at the following routine and can't get my grips around it. I have a class such as: MyClass.h ... @interface MyClass : NSObject { NSNumber *myNumber1; NSNumber *myNumber2; } @property (nonatomic, retain) NSNumber *myNumber1; @property (nonatomic, retain) NSNumber *myNumber2; @end and the m-file #i...

How to keep iPhone screen from reducing backlight..?

My app shows a picture and then an mp3 plays over it, describing the picture. The trouble is that the backlight on the screen reduces after 40 seconds or so, if the phone is not interacted with. How do I prevent the fade?...so that my picture doesn't go dark when they are looking at it. ...

Multitasking aware applications in iOS 4 and Custom URL Schemes

Hello all, I'm trying to implement OAuth securely as detailed here: http://fireeagle.yahoo.net/developer/documentation/oauth_best_practice#custom-url-osx. I seem to have hit a stumbling block, as I am unable to figure out how to handle a url which launches my application when in the background. I have registered my application to handl...

Notification of changes to the iPhone's /Documents directory

Hello We have an app that uses file sharing. UIFileSharingEnable is set etc. and it all seems to work fine, but I'm looking for some sort of notification of when files have been added/deleted on the iPhone side. Can anyone advise? Cheers in advance. ...

iPad app navigation bar with multiple buttons on the same side

how can I have a back button and another button both on the left side of the nav bar? since this is an ipad app there's space for multiple buttons. but I can only get it to show one button per side on the navigationitem... ...

UITableView crash on updates after text edit

So I'm totally stumped by this one and tempted to call "OS bug". I have a TableView controller with a single section, and in the header for that section there is an UITextField. Several operations result in rows being added/removed without a problem. However, as soon as text is edited in the header, and the keyboard dismissed, any inser...

no value entered in TableView row...

I have a basic view with a UITextField and a Tableview. I am able to enter text to the TextView and capture the value through an IBOutlet and IBAction. My IBAction is setMyNote within which I call the cellForRow... method. In my cellForRow.. method I have this snippet code static NSString *CellIdentifier = @"Cell"; UITableViewCell *c...

Difficult exluding objects based on key while enumerating an NSMutableDictionary

I'm stumped. I have an NSMutableDictionary w/ nested dictionaries that I am enumerating through to create an Array of a particular key value in a nested dictionary, but I want to exlude two "keys". I am able to do it if I exclude one key, but as soon as I try to use the "||" or operator in my If statement it stops working and just adds ...