i have a question regarding directly drawing pixels on the screen. i'm planning making a simple drawing program. i have to intensively modify the pixels on the screen.
on pc, i usually modify a huge 2d array that has the size of the screen, as this may be faster than directly drawing pixels on the screen. after i finish drawing on the screen, i then render the 2d array to the screen.
or maybe i will modify the frame buffer. but i'm really new to iphone development. i don't know if there is a frame buffer on iphone and what would be the best option to render pixels intensively.
I do have a related question about views and drawRect.
Say I put a UIView called filterView above all other views in a UIWindow (and it fully covers them). The filterView has an alpha of 0.1 to allow the underlying views to show through. Now when some underlying view calls setNeedsDisplay, I would would think that my filterViews drawRect would eventually be called it order to render properly.
However, that is not the case. The filterView's drawRect get called initially, but after that, underlying views will update themselves and filterView's drawRect will not get called. However if I set the background color of the filterView to some color, then the overall display is tinted by the filterView, so it is getting placed in play in that way.
Is there some other way to know when an area onscreen needs to be refreshed?