Simple question: Is it better to pursue a 20%, or even 50%,
improvement in drawing speed by rewriting in C++ or C than, say,
preventing the 2, 3, 4, or more extra redraws that are happening
prior to window flush? Don't laugh -- I have seen it happen. Often.
I subscribed to this list jus
[inputStream open];
[inputStream read: buffer maxLength:sizeof(buffer)];
...
Note that although your call to -read:maxLength: will work as you
expect most of the time, it's not guaranteed to work and is bad
practice.
The docs for NSInputStream say this method will "Return the actual
numb
Will thanks for the heads up, for my purposes this time around, the
input stream will be coming in off the file system, but I did not want
to load the whole thing into an NSData object.
Ah! Well, your approach will work, but if your file is less than 4GB I
highly recommend something like:
When inside of -[NSView drawRect:], what's the difference between
- (void)drawRect:(NSRect)rect;
{
if ([self needsToDrawRect:someRect])
}
- (void)drawRect:(NSRect)rect;
{
if (NSIntersectsRect(rect, someRect))
}
The NSView keeps a list of the actual sub
Under Tiger and before, be sure to note the following caveat:
Bug Fix in Observing A Key Path Of Self
In Mac OS 10.3 and 10.4 there was a bug in which a debugging feature
of KVO made it difficult for an object to observe one of its own
values using a multicomponent key path: right before the
When we put PNG resources in our iPhone apps, what color space are
they displayed under?
I know PNGs are re-processed by Xcode (into illegal, but more-
efficient, iPhone PNGs), are the color profiles embedded in PNGs used
either at the re-processing time or at the time of drawing?
As far a
Is it possible to set an HTML string on a UIWebView and have it resize
automatically to the right height, but NOT take up the entire screen?
I sure can't figure it out. I feel like the iPhone really HATES rich
text.
Here's what I've tried so far. Most of these are "Hail Mary" attempts,
wh