-(void)startTask;
appears to be private implementation and in theory should not be called from external classes.
To answer your question, you can call it something like this:
PtyView *v = [[PtyView alloc] init];
[v startTask];
[v release];
Though you will get a warning saying, PtyView
might not respond to startTask
. Since it is not in public interface of class.
Update: Above code assumes that when startTask
returns, you are done with this object. But something tells me that you might be using async callbacks. If that is the case then startTask
might return immediately and you won't release it then and there. Normally in this case, you will be notified by PtyView
about the completion of task. So you release it when the task is complete.
Update2:
Making a method public is easy. You just declare it in the public interface (the header file of class):
//in PtyView.h
@interface PtyView
-(void)startTask;
@end
//in PtyView.m
@implementation PtyView
...
-(void)startTask {
//starts task
}
@end
Notice that there is no category defined in the interface declaration.