objective-c

find out the force in iPhone

I have to develop an application. Requirement is given below. I have to put an indicator like speedometer in the bike. iPhone is put in the corner of a Car. The iPhone is in a placed in a car, from where it can't be dropped anywhere and can't be moved even. ( there is a special place in car where user place iPhone ) Now, Car is going...

How can I force invalidation of a running Cocoa program without additional custom code?

I have multiple custom NSViews in my Cocoa program. I am looking for a way to force them to invalidate without having to add additional code while the program is running. If I were doing this with on Windows with the .NET framework, I would just drag part of my program offscreen and drag back on again. Areas that was offscreen get in...

Testing View Controllers --iPhone

My question is 2-fold. 1. Can I use OCUnit to test View Controllers. If so, how should I do it? If not, is there another Testing Kit I can use? ...

awakeFromNib opposite?

Is there a reverse of awakeFromNib, a method called when the nib is closed? I know an application delegates receive a notification the the application will terminate, but was wondering if there was to save some state information on a simple NSObject. ...

How would I play songs or make a splash screen for my cocoa app?

How would I play songs or make a splash screen for my cocoa app? I know it's a simple question but I am a complete noob when it comes to cocoa. ...

how to inherit from multiple class

Let's say i have a griffon object that needs to be part of the felidae and bird class. How do i do it ? I can only make it inherit from 1 class at a time... ...

objective c operator meaning

what is the meaning of << and & in objective? for example ((touchedPads & (1 << 0)) != 0) ...

NSManagedObject subclass outside of managed object as a normal object

Hi all, I have an entity object Country with country name and country code. It is a subclass of NSManagedObject and I am using it with core data model to store its value to a persistent store. I have a place where the same Country object will used as a normal object i.e. I will use it to store some temporary country name. For that I ...

Strategies for porting Carbon code to Cocoa

I'm looking for strategies and articles on making Carbon code 64-bit ready. Carbon for 64-bit does not and will not exist. It's pretty much a dead end. So in order to bring Carbon application and toolkits to 64-bit their GUI part will have to be re-written in Cocoa and Objective-C, right? How can I minimize the effort I have to put in...

disable autofocus feature in iPhone 3G S

I want to disable the auto focus feature in the iPhone 3G S. How i can do it programmatically? I used custom UIImagePickerController for my camera application. I don't need this feature in my application. please help me. ...

Loading Accessory callout view for mkannotationview

I have a map annotation view that contains a rightcallout button which loads an accessory view which is a UIViewController class. I am using resuable annotations, but am wondering how I can pass updated information to my UIViewController class. Let's say I have 2 string values which map to 2 UILabels on my view. How can I update those va...

Is there a way to retrieve a set or array of keys for a given NSManagedObject?

For any given NSManagedObject, is there any method to return a set or array of keys (attribute names) for that particular NSManagedObject? I've tried looking around in NSObject & NSManagedObject docs but found nothing. Something that functions like NSDictionary 'allKeys' would be what I need, ie. myArrayOfKeys = [myDict allKeys] I pr...

Something functioning as "did Init"?? [objective-c]

Guys, what is function called after my class loaded, where i can call "self" there. thanks advance ...

[Objective-c] Asyncsocket didReadData question.

I sent a multi-line data which length is more than 20 i'm sure because i've test to get the data using terminal "cn" command , but if i read the data using asyncsocket like this: -(void)onSocket:(AsyncSocket )sock didReadData:(NSData)data withTag:(long)tag{ NSLog([NSString stringWithFormat:@"%d",[data length]]); } I only get lengt...

How to display a base64 image within a UIImageView?

Hey, I got this Base64 gif image: R0lGODlhDAAMALMBAP8AAP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAACH5BAUKAAEALAAAAAAMAAwAQAQZMMhJK7iY4p3nlZ8XgmNlnibXdVqolmhcRQA7 Now I want to display this Base64 String within my IPhone App. I could get this working by using the WebView: aUIWebView.scalesPageToFit = NO; aUIWebView...

Using the PayPal API in an iPhone application

Hello I want to use Paypal in my iphone application, I have find the soapRequest to integrating the paypal API. My code is NSString *soapMessage = [NSString stringWithFormat: @"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" "<SOAP-ENV:Envelope xmlns:xsi= \"http://www.w3.org/2001/XMLSchema-instance\" xmlns:SOAP-ENC=\"http://schemas.xm...

What are some Objective-c debugging tips?

I'm still haven't properly learned how to use the Xcode debugger, but I was wondering if anyone has some favourite debugging tips, things you can quickly insert into code to see the state of objects. Anything which would help me get more of a grasp on the internals of Objective-c. Mostly I rely on NSLog(@"%@", myObject) to see what's ha...

Suggested resources for learning about blocks in Snow Leopard

Now that there is no NDA, what are some good suggested resources for learning about blocks under Snow Leopard? ...

iPhone/Objective-C - transform voice "live"

hi! so i'm doing a little bit of research/thinking about a project i might do and have run into some questions you guys might be able to help me answer. is it possible in an iphone app (objective-c) to apply effects to a mic-input live. i've seen quite a few applications in appstore allowing you to record a snippet and then apply variou...

Dragging an Image from Safari and dropping it onto dock icon does not work in snow leopard?

I've got an app: You can drop an image file onto the app's dock icon and it will upload the image to a free image hoster. In 10.5 you could drag an image straight out of safari (and any other browser) and drop it onto the dock. (The app opened the image from the temporary folder the browser put it in and uploaded it to the net.) Now in...