Help modifying QuartzDemo example application

Posted by BittenApple on Stack Overflow See other posts from Stack Overflow or by BittenApple
Published on 2010-05-21T22:51:30Z Indexed on 2010/05/22 4:20 UTC
Read the original article Hit count: 212

Filed under:
|

Can anyone please, oh sweet pain, please take me out of my misery by writing a simple example on how the heck you pass a number (int value) which gets created in 1 .m file to another .m file.

In the apple demo application called QuartzDemo, there is a file called QuartzImages.m

This file has the following line of code: [CODE]CGPDFPageRef page = CGPDFDocumentGetPage(pdf, 1);[/CODE] Notice the (pdf, 1) in that line. This number should be replaced with an integer variable.

Now, there is also a file called MainViewController.m. In that file, there is a method? called -(void)viewDidLoad

In that method, I want to assign a number to the integer variable which would replace the damn "1" with whatever number I want.

I have been pulling my hair trying to get this done, reading beginning iPhone 3 Development book, dev documentation and God knows what not, without results.

Any help would be greatly appreciated...

Sigh.

© Stack Overflow or respective owner

Related posts about iphone

Related posts about iphone-sdk-3.0