NSScrollView overlapping text - objective-c

I have an implementation that abstracts from NSView to display a scrolling text view.
I have a long string I'm displaying on a custom class based on NSView. As soon as it starts to scroll the lines overlap one another and become unreadable. At the end of the loop, when it starts over it will show all the lines on the screen without overlap, and as soon as this first section reaches the end of the screen the overlap comes back for the rest of the drawing period.
Are there any ideas on what I could fix here?
Thanks so much.
Finally
Here are two screen shots, one has the text partly displayed without overlap, this is at the end of the first loop and it represents the beginning of the text.
This is the second screen shot, in which the overlap is prominent and consistent with how it is displaying most of the string.
Here is the code from the scrolling, as copied /pasted from
iTunes Song Title Scrolling in Cocoa

Since drawRect is overwritten it must also clear the background, otherwise anything drawn underneath it will show through and (as you can see) previous content is not removed. So, add a [backgroundColor set] call and NSRectFill before you start writing the text.

Related

First segment of my segment controller doesn't respond

I have a settings screen with a couple of segmented controls on it. All was well until I added a third. Now the new one works, and the top one works, but the one in the middle doesn't...
It used to work fine, but now the first segment doesn't respond. If I click on segments 2 through 4 my controller's method is called as expected. If I click on the first segment... nothing.
I suspect there is another flag somewhere that I hit by mistake, but I can't find it. Yes, all of the segments are Enabled. Any ideas?
I would suggest looking through the hierarchy in detail: the tap is possibly trapped by a partially overlapping view.
If a tap does not respond because the size of an element changes, it may because it is hidden by one of these:
an unconventionally long navigation item
a view with no visible content
a title view
This amazing tool has saved me time and again: Spark Inspector. It shows you the intricate overlapping layers of all your UIViews.

Move Insertion point of an NSTextView and make the written content visible

I am working on one Mac app. In which I want to play few tricks with insertion point of an NSTextView.
![NSTextView with overlay on it][2]
What am I doing is, I have an NSTextView (The whole image screen is of NSTextView) and above that I have placed one overlay (as you can see at the bottom of the image). There are two Labels at the extreme Left and Right end and has a white gradient view too. All these three I have placed above NSTextView.
Now when User types in, textview gets scrolled and at one point, typed letters goes below the overlay.
I have to manage this stuff only. I want to keep track that user has reached to the overlay border and if yes, I want to move the insertion point to little upside so that user can see the content which he/she is writing.
Will anyone suggest me, how to make this possible ?
I have tried many things, but its not working. Kindly help.

How to add empty cells in UITableView without expanding it

I have UITableView with custom looking cells. Now user can scroll past the bottom and see that there are no more rows (cells) and see background. I want to create impression that there are more rows below, but they should not be added to tableview, so when user scrolls down, it bounces back to last useful cell.
TableFooter and subview expands content and user can scroll there (or maybe I was doing it wrong).
Right now I added new empty cells and after any action that may recount contentSize I specifically set contentSize to default setting. But I feel like it's not the right way (although it works). Is there some other way?
I tried searching, but it's hard to explain what I want in few sentences, not to mention in search line.

How does the Reeder Mac app animate lists when switching folders?

Initially I was under the impression that it uses the table row slideup/down animations while inserting/deleting new rows but I doubt if it's doing that as it does it so fluidly even with thousands of items in the list (otherwise it would take a lot of time for the deletions/insertions to work).
Am I right in my assumption that it's simply attaching a new instance of the News list at the bottom of the screen, shrinking the above one while the one at the bottom expands to fill up space?
UPDATE:
Please see this video of what I mean: http://dl.dropbox.com/u/4960327/ReederAnim.mov
I can not tell you exactly how Silvio Rizzi made this, but as you see in the playback, a list view is added behind the shown list view, and the front list view fades out (.alpha = 0.0;) while the list view behind it expands its height per row.
When you desicate it frame by frame it becomes quite clear what he does, and it is really not that advanced. But I have to admit, with the white "milky" polished interface, it looks quite neat.
In addition, you can see that while animating, the background list view only renders the top 7 entries (hopefully calculated by dividing the view height with the average height of the cells shown) making the list view quick to load. Then afterwards, he can load an extended array of cells once you start scrolling, or in a background thread starting once the animation is complete.

How to Insert/Remove/Update UITableView without it appearing to move?

After reading this, I'm interested in being able to dynamically update a UITableView without the view scrolling. That is, if the 12th row is visible, and some background process runs and calls for a new row to be inserted at position 0, how can that be done without the table appearing to scroll?
The closest I've been able to come to achieving this is to do any and all updates in a single -beginUpdates/-endUpdates block and to adjust the contentOffset as appropriate after that. But some of my code might have a bunch of calls to -insertRowsAtIndexPaths:withRowAnimation called outside such a block, and when I do that, the thing can scroll all over the place.
How can I make UITableView stand still?