objective-c

Creating Cocoa PopUpMenus programatically and Getting code form a GUI item built with the interface builder

I need to create many Cocoa items programatically and most resources I can find focus on creating GUI with the builder. Is there any way to get the objective C code for an interface item created using the interface builder in XCode? Also, I am a little confused about PopUpMenus. Are PopUpMenus contained inside PopUpButtons or are the ...

Which video file formats can QTKit play?

Is there an overview of file formats which QTKit understands? ...

Can I disable UIPickerView scroll sound?

Hi, I want to disable the annoying clicks that the UIPickerView generates upon scrolling up and down. Is there a way to do this? I want to play short sounds for each item that the picker view lands upon. It gets ruined by the built in sound. I understand that the picker sounds can be turned off globally by switching off the keyboard so...

How to get NSImage of generic folder icon on OS X 10.5 and 10.6

I'm writing a Cocoa application that displays the contents of an archive file in an NSOutlineView. I provide a custom icon for an NSBrowserCell in the outline column, and it works great, but I ran into a little snag — using [NSImage imageNamed:@"NSFolder"] returns the correct image (a generic folder icon) on 10.6, but on 10.5 it returns ...

Drag UILabel from point A to point B

How can I go about dragging a UILabel from point A to point B on my iPhone application? ...

Exclude Ipod Touch from phone feature iPhone Application

How can I exclude the call and sms feature from Ipod Touch but still retain it's functionality on the iPhone. The iPod Touch of course has no phone and sms is available via an optional app. Tech support kindly suggested I take a look at the system call "sysctlbyname" and the section on "CTL_HW" from the Apple provided iPhoneOS reference ...

Increase too-tight icon spacing in NSOutlineView

I'm writing a Cocoa application that displays the contents of an archive file in an NSOutlineView. I provide custom icons for an NSBrowserCell in the outline column, but I haven't been able to get the spacing quite right — the folder icon always appears too close to the disclosure triangle, as shown below. (FWIW, Versions and BetterZip b...

What is second param of NSLocalizedString()?

What is the *comment parameter in: NSString *NSLocalizedString(NSString *key, NSString *comment) If I do this NSLocalizedString(@"Hello_World_Key", @"Hello World") and have two versions of a Localizable.strings (English and es), does each need the entry: English: @"Hello_World_Key" = @"Hello World"; Spanish: @"Hello_World_Key" = @...

Smoother UIView

Hi all, i'm looking for a way to make the menu system of my (very first) app scroll more smoothly. Currently I've got a panorma type view built in IB that's ~1900px wide by 480 tall image. On top of this are 8 buttons in various places along the view/image, when one of the buttons is selected i update 'xPoint' and call the below to updat...

LaunchAgent - Is there something like RunAtScreenSaver?

Hi, I am looking for a way to execute my app (it's a background task) at times, where the machine is "idle". A good incident would be when the screensaver launches. I already read the manual auf launchd and already use a LaunchAgent to lauch my app at certain intervals, but I found nothing that might help me launching my app when the sc...

How do I flag a function as being deprecated in an iPhone Objective C header file?

Hey guys, Does any one know how to do this? I'm guessing there's just some keyword I can stick after the function somewhere? EDIT: I would like for a compiler warning to be generated should anyone try and use the deprecated function, similar to the behavior seen in Apple's APIs. Cheers! Nick. ...

xCode Library Paths

I'm starting a new xCode project. I'm porting in some code from my last project, but I've re-ordered the directory structure, so that it makes more sense ala: Lib Package1 File1.h File1.m Package2 File2.h File2.m etc... Now my issue is that before I was using a flat file structure and using the xCode groups to ...

Time to learn Objective-C/Cocoa for an Apple agnostic

This question is inevitably subjective, but I will ask anyway. I'm a PC. I've always been a PC. I have very little Apple expertise, although I'm completely happy in *nix. I've plenty of experience with development, and consider that I am able to pick up new languages and concepts faster than most of my colleagues (although ML/F# still h...

Running C code directly in the browser?

Performance considerations aside, is there any known way to take existing C, C++, or Objective C code and run it directly in the browser? For example, a compiler that converts all the code into some interpreted language that can be run in the browser. Like Javascript, or Actionscript and the Flash player, or I suppose Java and the JVM. ...

iphone Simulator crashing from Xcode run and go

Does anybody know what might be causing this problem? When I run the code, the program immediately crashes on the simulator before getting anywhere; however if I just go to the simulator and run the program, the changes were loaded and there doesn't seem to be any obvious problems. Or how could I try to pinpoint this problem? [Session ...

imagepicker+navigationController causing problems in iphone?

how do i do this..i have appliation delegate...in which i added uinavigation controller through code... here is my code... - (void)applicationDidFinishLaunching:(UIApplication *)application { HomeScreenController *homeScreenobj=[[HomeScreenController alloc] initWithNibName:@"HomeScreen" bundle:[NSBundle mainBundle]]; navController...

How big is an Objective-C iPhone app vs. a MonoTouch app?

I am considering using MonoTouch for some iPhone development, but payload size is an important factor. For a user who has never installed Mono on their iPhone before, what would the size of an Objective-C "Hello World" app be compared to a MonoTouch "Hello World" app? More specifically, what is the approx. number of bytes that need to ...

Can't find the example projects from Stanford cs193p

I am looking for the Flickr multithreaded example application that is used in lecture 10 "Performance and Threading". He does a few things that I would like to look at. The particular files I'm looking for are ImageLoadingOperation.h and MyTableViewController.m? Does anybody know if they exist somewhere out there and I just missed it? If...

iPhone game development, saving state with files or sqlite?

For iphone game development. How do most people retain state? Using sqlite? or some kind of file. The game is a RPG type game. ...

Propagating tap events down through invisible UIButton

Hello community, I have a couple of UIButtons in the view which "floats" above UIScrollView (i.e. scrolling of the UIScrollView does not influence the buttons' position on the screen). My application logic sometimes requre hiding one of those buttons, and when it happens the UIScrollView could not be scrolled bu dragging from the point ...