objective-c

How to successfully import Appkit Framework in iPhone?

Hi, I would to use the NSSpeechRecognition but this Appkit Framework was not available in iPhone os frameworks. This is available in systems/library/frameworks/Appkit.framework. Is there other way to make use of AppKit for NSSpeechRecognitio in iPhone? Thank you. ZaldzBugz ...

How to stream the audio file from the server in Iphone sdk?

H guys, I need a code for Streaming the url string on an audiofile and need to play it by AVAudioPlayer. Can anyone suggest me how to get tid of this. Thanks in advance. Monish. ...

How to make a ConstantList Class in Objective C

How to make a ConstantList class in Objective C of an application which could be accessible to all the classes who are using constants. like in Actionscript we do: public class ConstantList { public static const EVENT_CHANGE:String = "event_change"; } Or what is the best approach to handle application constant. Regards Ranjan ...

Problem with small numbers in Objective C 2.0

I created a calculator class that does basic +,-, %, * and sin, cos, tan, sqrt and other math functions. I have all the variables of type double, everything is working fine for big numbers, so I can calculate numbers like 1.35E122, but the problem is with extremely small numbers. For example if I do calculation 1/98556321 I get 0 where ...

NSTableView and data validation?

In order to properly learn Objective-C and the Cocoa framework, I have started building a CoreData application, but I'm a bit at a loss on how to properly provide data validation when an item is being edited in an NSTableView. My model has an entity called "Business" with two string properties: a name and an issued tax number. The secon...

How to test the app in iPad?

HI, everyone, I want to ask a question about the iPhone. I am writing a iPhone program, but I can only test the program in the iPhone simulator. Can I test the app in the iPad simulator? thank you. ...

MAC OS Activity Monitor Information

Hi all, I'm using Activity monitor to measure performance in my iPad app, in addition to Instruments. There are 4 columns which I cant understand. Real Memory,Private memory,Shared Memory and Virtual Memory. Do you know the meaning of these 4 terms and which one I should use? ...

How to make a ball move along the edge of a rotating rectangle in xcode?

I wish to make a lever and rotate the lever using accelerometer. I have this problem trying to place the ball on top of the lever and slide the ball along the lever according to the rotation. Would anyone drop me some hints or refer me to sample codes? ...

Why the dummy text can't load on my cell?

This is the tableView, as you can see, which cell, have two part, the left one, is a leftUIView, and right one, is the rightUIView. The red and green color can display, but the rightLabel I create can't show successfully. What's wrong with my code? Thank you. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath...

Downloa and Play Audio/Video files from server to our application using iPhone sdk

Hi all, I am implementing a server based application. In that I need to Download and Play audio/video file.Is it possible to Download and Play Audio/Video files from the server to our application. Please help. Thanks in advance, Sekhar Bethalam. ...

iphone - view init issue

I have come across a strange behavior... In class A, at the viewDidLoad method I do: b = [[B alloc] initWithNibName:@"B" bundle:nil]; //init the B class (declared as B* b) [b setText:@"ABCDDEEE"]; //change the text of a UITextView in b note that b's view is not shown until a button is pressed. However, when I press it and go to b's v...

When should I use Class Method instead of an init Instance Method?

This is an example straight from Apple's documentation - @implementation MyClass - (id)initWithString:(NSString *)aName { self = [super init]; if (self) { name = [aName copy]; } return self; } + (MyClass *)createMyClassWithString: (NSString *)aName { return [[[self alloc] initWithString:aName] autorelease];...

Accessing unknown 'view' component of a property

I get an 'Accessing unknown 'view' component of a property' error, when I'm trying this: if (self.newsViewController.view.superview == nil) I have a synthesize and an import for NewsViewController. What I'm doing wrong? ...

Speed and direction of an animated UIView/layer

Hello everybody, Today my question is about Core Animation. Is the information related to direction and speed of an object (UIView/layer), moving (animated) on the screen, stored anywhere and directly accessible via method/property? Is this information available even in case of an object dragged by the user? Thank you. ...

global variable that returns a true or false

can anyone show me how to implement a var that displays a true value on user input and this value can be used in other controllers to add a value to a different controller... i would like to use this code to signal arrays to add objects. If anyone has a better way to implement this I would appreciate that too. I have an ibaction that re...

Names of files accessed by an application.

Hello Everyone! Any help with this problem would be fantastic. I appreciate all contributions! Let us say I'm running a daemon that is observing the behaviour of the app that has keyboard focus. I have it's PID and process name. Is there any way I can see what files that application is accessing? I'm programming in Objective-C, Cocoa ...

Accordion Menu in XCODE

hey, I'm trying to make a accordion menu in Objective-C for a iPad app. The only thing I know is that I should look over core animation. Couldn't find anything helpfull. Can anyone help me ? at least give me a few pointers. ...

Property error in Objective C

Hello. I have the following code: In .h: interface .... { int CatID; ... } @property (readwrite) int CatID; .m: // Already includes the header file (.h) implementation ... { @synthesize CatID; .... - (void)setCatIDa:(int)cid { self.CatID = 20; NSLog(@"cat id: %d", CatID); // this returns 20 } - (I...

using OAuth authentication in iphone for twitter

Hey guys I am trying to implement the twitter for posting the comments about my music application.For that I use OAuth authentication twitter but it give me error please help out I didn't know anything in this. it show's me this error "'TWITPIC_API_KEY' undeclared (first use in this function)" if i need some key in this than where to...

iOS 4 resume from background

Hello guys! It is possible to get a notification or something when the user opens the application, but the application was in the background (so it wasn't closed)? ...