How to display .m file content in objective c programmatically? - objective-c

I need to display the content of a .h/.m file on the iPhone's screen, maybe in a UITextView, how can I do that ?
The problem is that i need the code to be coloured exactly as shown in code.
Thank you in advance.

You should take a look at my answer to this question.
The best solution seems to be ParseKit.

Related

how to add text on image and move that text to different points(objective-c)

I want to add text on image, not on a specific point but want to move it anywhere on the image. just like many photo editing apps. anybody know how to do this?
You can set label on UIImageView and then you can write whatever you want to write.
https://github.com/kcandr/IQLabelView
This one is the best approach and it worked fine for me by making the required changes to the code.

NSTextField subclass for sliding text - Objective-C/Cocoa

I want to do what is described here. I know I am kinda repeating the question but that post does not have an answer. I have searched the net and didn't find anything I could understand either.
So, here is my problem: I want to create an NSTextField subclass that animates text (in the way described by the other post) when the text is too long to be completely displayed. I have absolutely no idea on how to do this, so some sample code would be nice for complicated answers. If it helps, I only want to use this to animate labels (text not selectable nor editable). Thanks.
It seems that this SO entry is close to what you need. It is not based on a NSTextField but on a NSView, but the result is what you are looking for and it should note be hard to modify.
Those links should show you the way :
Making uitextview scroll programmatically
Auto Scrolling UITextView Problem
They talk about iPhone classes, but I'm sure you will be able to adapt them for NSTextField.

Changing size of UIWebView text

I'm trying to change text size in UIWebView, but I don't know how. Help me please.
Take a look at this question; it provides a JavaScript based solution.

Ipad splitView, is it possible to resize the splitView's rootController?

Right now I have a splitview that loads PDFS to a webview. When the application is in portrait mode, the formatting is correct and it does what it needs to do. However, when I switch it to landscape mode, the pdf is too large and goes off of the right side of the screen. How would I fix this? One solution I can think of is to resize the rootView table, by making it thinner it would open up more space for the PDF. Any ideas on how to do that? or if it is even possible?
Thanks in advance!
You can't with the default SplitViewController, luckily Matt has written a pretty good one that can do stuff like that!
You can find it at GitHub: https://github.com/mattgemmell/MGSplitViewController/

UITextView scroll

This is a real n00b question but i am very new at this and have been looking for an answer and also read the reference as i am trying to work with UITextView.
I want to add quite a lot of text into a view and i want it to be scrollable.
I have created the UITextView in IB, added text via "self.myTextView.text = #"...", which works. However i am not able to scroll down and see all text. I see only the amount of text that fits in the view i have.
I wonder if someone nice could help me and give an example/hint how to get the UITextView scrollable.
Thank you.
If it's static text and you'd like some formatting, I recommend using a UIWebView. You can give it a variety of files types, and edit the file easily.