I have decided to make an application in Cocoa. The application will an image file, and will just add a text on top of it at the selected location.
I have managed to display the image using an NSImageView, and I have managed to display a selected text onto the image. I also wrote a very basic export feature (I will fix them all better afterwards).
But I have some problems:
1)I initially wanted to implement an NSTextView to allow the user to give the text he/shw wants and to add multiple lines of text. I couldn't do because every time I tried etracting the NSString from it (using the -string method) it gave me a nil string and the debugger came up. So I used an NSTextField instead. What can I do to fix that?
2)Most importantly: I want to find a way to resize large images. For smaller images, I have written code that resizes the image to fit the NSImageView. But that doesn't work for larger images. How can I scale them down to fit the NSImageView?
3)Last but not least, for large images, I want to be able to scroll the NSImageView so that I can see every inch of the image it displays. The way it is now, I can only see a small portion of the image that I am displaying.
If anyone could help me with these problems it would be greatly appreciated. I am attaching my project so far. I am warning you: It is my first project with images.
I have managed to display the image using an NSImageView, and I have managed to display a selected text onto the image. I also wrote a very basic export feature (I will fix them all better afterwards).
But I have some problems:
1)I initially wanted to implement an NSTextView to allow the user to give the text he/shw wants and to add multiple lines of text. I couldn't do because every time I tried etracting the NSString from it (using the -string method) it gave me a nil string and the debugger came up. So I used an NSTextField instead. What can I do to fix that?
2)Most importantly: I want to find a way to resize large images. For smaller images, I have written code that resizes the image to fit the NSImageView. But that doesn't work for larger images. How can I scale them down to fit the NSImageView?
3)Last but not least, for large images, I want to be able to scroll the NSImageView so that I can see every inch of the image it displays. The way it is now, I can only see a small portion of the image that I am displaying.
If anyone could help me with these problems it would be greatly appreciated. I am attaching my project so far. I am warning you: It is my first project with images.