(I am a newbie on Objective-C, and) I have been trying to pass a pdf name and initialize a class like this:
contCon = [[contentController alloc] initwithPdf:@"mag.pdf"];
and
-(id)initwithPdf:(NSString *)pdfName{ ... }
it gave me no error but pdf name doesn’t come up as I sent it. So i tried to do this:
contCon = [[contentController alloc] initwithPdf:CFSTR("mag.pdf")];
I also couldn’t figure ou how to get this type of data in the method.
-(id)initwithPdf:(CFSTR)pdfName
or
-(id)initwithPdf:(CFSTR *)pdfName
doesn’t seem to work, and google didn’t help me either.
I want to know in what type to pass the name of the pdf file. Thanks in advance.
and
is better one……