ll us what you are
trying to accomplish. If you want to print the text in a text view, Yandy has
told you how – but where you put it will depend on what your purpose for
printing it is in the first place
--
David Duncan
Apple DTS Animation and Printing
__
response to and you can figure out where
the calls belong.
--
David Duncan
Apple DTS Animation and Printing
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the mod
iPod Touch is a popular
development environment and should allow you to do most things that are not
phone specific.
--
David Duncan
Apple DTS Animation and Printing
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or mo
On Jan 2, 2010, at 6:29 AM, Alexander Spohr wrote:
> What is the do while good for?
It lets you reliably write constructs like:
if(condition)
MyMacro(foo);
--
David Duncan
Apple DTS Animation and Printing
___
Cocoa-dev mailing list (Cocoa-
using the UIView 'center' or 'frame' property. There are a fair number of
samples that show this (look up the properties on UIView in the documentation
for links to the samples).
--
David Duncan
Apple DTS Animation and Printing
__
You should not be releasing pnl because you do not own a reference to
it. The memory management rules explain why this is.
--
David Duncan @ My iPhone
On Jan 2, 2010, at 2:44 PM, Charles Jenkins
wrote:
Hello, everyone. I'm struggling through the steep Cocoa learning
curve, and
do with it further).
--
David Duncan
Apple DTS Animation and Printing
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.co
pecific time before
storing them.
--
David Duncan
Apple DTS Animation and Printing
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)li
, NSDate knows nothing about time zones, daylight's
savings time, etc. It is just an offset from Midnight 1/1/01 GMT. Everything
else is a display issue, and as the Core Data documentation warns you must
store the timezone information separately (which can also mean that you assume
a standa
map.m_pixelsx * 4, colorSpace,
> kCGImageAlphaNoneSkipFirst|kCGBitmapByteOrder32Host);
This code creates a bitmap without alpha.
> The problem is I just see garbage, no image. Clearly I am doing something
> wrong with the NSBitMapImageRep but I have no idea wh
mark the memory for the bitmap context as copy-on-write.
--
David Duncan
Apple DTS Animation and Printing
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the moderators
mplete list of zip codes to validate against.
It might make more sense to see if your weather service can "fast fail" on an
invalid zip code, since they will likely maintain a valid zip code list, and if
you do it yourself you would want to maintain the same one they do.
--
David Du
mance win, you should not do it in the name of
performance. But there may be other reasons to do so, although from some of the
other responses to this thread, it would seem that there are just as many other
reasons not to :).
--
David Duncan
A
Jan 7, 2010 at 2:52 PM, Dave DeLong wrote:
>
>> That's backwards. NSArray is ordered; NSSet is not.
>>
>>
>>> On Jan 7, 2010, at 2:44 PM, David Duncan wrote:
>>>
>>>
>>> Since NSArray is unordered I would not expect its containsObject
vider, but doing that is straightforward. In the end, it is
about the same number of lines of code to create the image directly, and you
avoid the call into the kernel.
--
David Duncan
Apple DTS Animation and Printing
___
Cocoa-dev mailing list (Cocoa
ng the image isn't going to change either way. If
you have drawing performance issues, there are likely other venues that can
resolve that problem, but we would need performance metrics to know what is
your bottleneck.
--
David Duncan
Apple DTS Animation a
subview of the view controller's view in the XIB,
then this should not be necessary.
--
David Duncan
Apple DTS Animation and Printing
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments
On Jan 13, 2010, at 6:57 AM, Gustavo Pizano wrote:
> I want to get the actual size of the NSImage which I dragged into an
> NSImaveView that has the imageScaling to NSImageScaleProportionallyUpOrDown.
Does requesting the size from the NSImage not do what you want?
--
David Duncan
App
. Once you've gotten the hang of what AppKit has
to offer (and it does have quite a bit to offer) then you can consider diving
deeper into using Core Animation directly.
--
David Duncan
Apple DTS Animation and Printing
___
Cocoa-dev mailing
On Jan 13, 2010, at 9:17 AM, Gustavo Pizano wrote:
> On Jan 13, 2010, at 5:53 PM, David Duncan wrote:
>
>> On Jan 13, 2010, at 6:57 AM, Gustavo Pizano wrote:
>>
>>> I want to get the actual size of the NSImage which I dragged into an
>>> NSIm
On Jan 13, 2010, at 9:36 AM, Dave Fernandes wrote:
> On 2010-01-13, at 12:20 PM, David Duncan wrote:
>
>> That said, I don't see how you couldn't just calculate this yourself. Just
>> grab the size of the image, figure out what the less of the two scales you
>&g
a new layer, assign the contents
of the parent layer to that new layer's contents, then assign that layer as the
mask of all subviews. This may require a bit of futzing around to get right
however.
--
David Duncan
Apple DTS Animation and Printing
___
a little fast on the exact usage of the mask – iirc,
you should only need to apply it to a common parent and it should affect all
children as well.
--
David Duncan
Apple DTS Animation and Printing
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
but keep in mind
that the masking layer needs to be in the same coordinate space as the layer
masked. Simplest way to do this is to assign the masking layer's frame the
value of the layer to be mask's frame.
--
David Duncan
Apple DTS Animation and Printing
return nil.
There are actually lots of ways to do this so I highly recommend you read the
documentation for that action, as the other methods may be useful in other
contexts.
--
David Duncan
Apple DTS Animation and Printing
___
Cocoa-dev mailing list (C
each layer type can specify which keys are implicitly
animated (and this can be further customized by developers). If you are saying
that CAOpenGLLayer has a different set of default implicit animations, thats
entirely possible, but they both should use the same mechanism.
--
David Dunca
n with respect to
its contents.
--
David Duncan
Apple DTS Animation and Printing
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)l
ontent of a layer, which in the case of a plain CALayer means that anything
drawn via -drawInContext: or -drawLayer:inContext: will be accessible via the
contents property.
--
David Duncan
Apple DTS Animation and Printing
___
Cocoa-dev mailing list (Coc
ether. If
you want to apply blend modes, you will have to do the rendering yourself with
that limitation in mind.
--
David Duncan
Apple DTS Animation and Printing
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests
Is this not possible?
It certainly is possible. I would recommend you take a look at the QuartzDemo
sample code, it shows almost exactly what you need to do.
--
David Duncan
Apple DTS Animation and Printing
___
Cocoa-dev mailing list (Cocoa-dev@lists.a
correctly. The contentsRect is a
rectangle in a unit coordinate system, which means that the coordinates range
from 0 to 1. Assuming your contents are 200x200, then the proper contentsRects
would be CGRectMake(0.5, 0.5, 0.25, 0.25) and CGRectMake(0.0, 0.0, 0.25, 0.25).
On Jan 22, 2010, at 1:57 PM, David Blanton wrote:
> So my question. "What is the 'proper' means of handling this situation?"
Rearrange the views to be siblings instead of parent-child in Interface Builder?
--
David Duncan
Apple DTS
filter
> I've written.
What is the specific problem you are seeing with the larger content? If you
mean the content is being resized downwards, then try changing the layer's
contentsGravity property to center (or one of the other non-resize variants).
--
David Duncan
Apple
back
locally.
There is nothing for you to do, and nothing for you to fix. It is also not the
cause of your video issues (that I don't know).
--
David Duncan
Apple DTS Animation and Printing
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Pl
l not be
called until the thread terminates, which is likely your issue.
--
David Duncan
Apple DTS Animation and Printing
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact t
prone (as well as allowing for a cleaner handoff of content).
--
David Duncan
Apple DTS Animation and Printing
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the moderator
t; So, what are the current options for displaying movie like content in your
> app and have a decent control over playback and display?
As Glenn mentioned there is the UIImageView's animationImages property. You can
gain more control by dropping down to the Core Animation level as well.
it test to find the layer of interest instead, especially since
moving the layers around would mean moving the tracking areas around too.
--
David Duncan
Apple DTS Animation and Printing
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do
g and interacting even while refreshing large datasets like the one I
> cited.
You can create the images on a secondary thread, then pass them back to the
main thread for assignment. The heavy operation is the drawing, not the
uploading of drawn content. You may also want to consider culli
re in the view's internal (bounds)
coordinate system.
When view.frame.size != view.bounds.size this is trickier, but that is an
unusual case for layer backing, and I don't think it is your case.
--
David Duncan
Apple DTS Animation and Printing
___
Co
rocess
to do it however, as using a small fixed number of tiles would make this very
slow as you would end up needing to respecify content you've already specified
(basically draw-upload-draw-upload).
--
David Duncan
Apple DTS Animation and Printing
_
e doing. It will depend a lot on how much content you have and the
specifications of the system you are running on.
--
David Duncan
Apple DTS Animation and Printing
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin request
either
fairly short or fairly small. Animating large images has issues with memory
usage that are difficult to overcome on most hardware (even on newer hardware
it would be difficult to get even 10s of fullscreen animation via frame-based
techniq
hip model, which is
confusing the analyzer. If you renamed your method to "newPDFDocumentRef" then
the analyzer wouldn't give you either error, as this would be in line with the
standard ownership model.
--
David Duncan
Apple DTS Animation and Printing
r
> behavior.
Create only works with functions (CF convention). new only works with methods
(Cocoa convention).
--
David Duncan
Apple DTS Animation and Printing
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin req
, although it is harder to tell in your
case due to the selection area. If you see colored highlights when you zoom in
on the image in one but not the other, then it is the issue I'm describing.
--
David Duncan
Apple DTS Animation and Printing
___
uestion directly.
--
David Duncan
Apple DTS Animation and Printing
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
, or if the
camera is capable of movies check +[UIImagePickerController
availableMediaTypesForSourceType:]. Compass can be detected via
-[CLLocationManager headingAvailable].
--
David Duncan
Apple DTS Animation and Printing
___
Cocoa-dev mailing list (Coc
led. What am I doing wrong here?
Layers (unlike views) start life validated. You need to call the layer's
-setNeedsDisplay method for your -drawInContext: method to be called, so you
should add a [lines setNeedsDisplay] call at some point.
--
David Duncan
Apple D
On Feb 11, 2010, at 4:50 PM, PCWiz wrote:
> Yep, I just tried that (sent a reply a minute ago) but the drawInContext:
> method still isn't being called.
Its because your layer is still sized 0,0. Not much you can draw into a layer
that size :).
--
David Duncan
Apple DTS Animation a
after. You may also want to consider
creating a UIView subclass that returns [CAGradientLayer class] from its
+layerClass method and exports methods to configure the gradient layer, then
you can do your layout in IB (although you would still need to configure it in
code).
--
David Duncan
App
not guaranteed, but common) so the view's backing
store is interpreted as a white circle on a black background.
If you set opaque=NO, then you may get white on a clear background, but you can
only guarantee such behavior if you set backgroundColor=[UICo
On Feb 13, 2010, at 6:49 AM, Josh Tucker wrote:
> I'm loading a PDF stored locally into a UIWebView. Is there any way that I
> can achieve paging?
No, if you want paging you will have to implement your own PDF viewer. If you
use the UIWebView, you get what you get.
--
David Dunca
f you are creating the view programmatically, -initWithFrame: should be fine.
If your loading from a nib, then -awakeFromNib is the appropriate place.
--
David Duncan
Apple DTS Animation and Printing
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com
osePath
call after you've specified the first round rect (instead of your
CGContextAddLineToPoint call).
--
David Duncan
Apple DTS Animation and Printing
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or
dButonsAnimation forKey:@"animateButton"]; otherwise the
> animation will fire, so to what layer should I add the CAAnimationGroup? or
> what shall I do?
Core Animation always copies an animation when you add it to a layer. Layers
cannot share animations, and you cannot group animations across
y they expect it to.
In the UIView case, the center property corresponds to the position property,
and the anchorPoint left at its default 0.5,0.5.
--
David Duncan
Apple DTS Animation and Printing
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
P
ks are important, but its only 128 bytes... don't worry about it
:). File a bug with the conditions under which it reproduces and move on.
--
David Duncan
Apple DTS Animation and Printing
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do n
On Feb 24, 2010, at 1:02 PM, Gustavo Pizano wrote:
> mmm.. nice question... where is the link?
http://bugreport.apple.com
--
David Duncan
Apple DTS Animation and Printing
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not p
not available.
There are various approaches that all involve doing the work yourself, which
means breaking the path apart into its components (CGPathApply) and doing the
interpolation yourself.
--
David Duncan
Apple DTS Animation and Printing
___
Coco
all of your content, then animate
it so that it reveals that content.
--
David Duncan
Apple DTS Animation and Printing
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the mo
o trace through 2 points and end at the same
location (2,2). CGContextAddCurveToPoint generate a bezier curve that starts at
the current location, approaches the 2 control points (which are your various
combinations of min/mid/max x/y) and ends at the end point (which is always
t all.
But if you need to draw, you need to draw. All other methods of
getting content into a UIView (or more specifically the view's
CALayer) consume similar processing time in most cases.
--
David Duncan @ My iPhone
On Mar 6, 2010, at 6:57 PM, Jon wrote:
I get indications from readin
also
generally helps to not think about autorelease pools as anything more than an
implementation detail until you have gotten all of this down, as they won't
make a whole lot of sense to you until you understand how object ownership
works.
--
David Duncan
Apple DTS Animation and Printing
his problem in the past but gave up as the animation was
>> optional.
--
David Duncan
Apple DTS Animation and Printing
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the lis
n
animations as the memory requirements grow rather quickly. I would generally
recommend that you break your animations down into constituent pieces and do
the animation in a combination of cycling images and code to move the views
presenting the animation.
--
David Duncan
Apple DTS Animation
od without it being
> deallocated out from under me. But since I expect an instance variable to be
> valid after init returns, I had better retain it.
>
> Is that right?
Yes, this is what I meant.
--
David Duncan
Apple DTS Animation and Printing
___
system that took instructions from a
resource file and built the views necessary and applied the animations dictated
by the resource. You can build a generic animation system in this manner and
potentially save considerable amounts of memory. Granted, doing so is not
necessarily a trivial exerci
iew that I am calling this code
> on is layer backed (set in interface builder).
The frame is not real, it is a property derived from the position, bounds.size,
transform and anchorPoint properties. If you want to animate the "frame" of a
layer, then you need to animate the position a
mplement controls as CALayers.
This is also an option, although you would need to do hit testing and
such yourself. For that reason alone I would probably go with option 1.
--
David Duncan
Apple DTS Animation and Printing
___
Cocoa-dev mailing list (C
Why not just change the view's center property?
--
David Duncan
Apple DTS Animation and Printing
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the moderato
he tx & ty values in your
transform matrix. If you move the view's center, then you are updating
the view's center property. Either way its the same amount of work on
yoru part.
--
David Duncan
Apple DTS Animation and Printing
___
Cocoa
something better that you can do here...
--
David Duncan
Apple DTS Animation and Printing
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev
not - read the man page x-man-page://3/sleep for details.
If you want something closer to a drift free timer, then you need to
determine when you want to wake up and use mach_wait_until() or a
higher level API to wait until that time.
--
David Duncan
Apple DTS Animation and Printing
ng your test is
upside down?
--
David Duncan
Apple DTS Animation and Printing
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.
x27;s transform
however, then it is possible your text is going to be upside down.
The usual case of this is altering the text matrix, via
CGContextSetTextMatrix, as it is not saved when you save the drawing
state.
--
David Duncan
Apple DTS Animati
The Core Animation instrument (and a few others) require you to target
the device rather than the simulator.
On Jun 13, 2009, at 2:46 PM, Chunk 1978 wrote:
how can i add core animation to the performance tools list? it, and
several others, are deactivated.
--
David Duncan
Apple DTS
ScrollView. If
the image is fairly large, then you may want to use a CATiledLayer
(but you will have to draw it via Quartz instead of via UIImage's draw
methods).
--
David Duncan
Apple DTS Animation and Printing
___
Cocoa-dev mail
reen (for example) then setting the view's center to the center of
the screen is a saner approach than using the transform matrix to do it.
--
David Duncan
Apple DTS Animation and Printing
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
form of a view within the same animation
block and both animations will occur concurrently.
--
David Duncan
Apple DTS Animation and Printing
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comment
tent of the layer, the
anchorPoint determines how the extent is positioned relative to the
position, and the transform is applied to that final rectangle to
determine the actual position on screen. The frame rectangle is then
extracted from t
but really its saying to place half of the bounds on either
side of the position.
--
David Duncan
Apple DTS Animation and Printing
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comment
view.frame));
CGPoint c2 = view.center;
Then you will find that c == c2, c != visualCenter, and c2 !=
visualCenter.
This is why using translations for transforms is very confusing. You
expect the center of the view to change, but it does not. This is by
design.
--
David Duncan
Apple D
valid (if somewhat useless). It just puts them all in
the same bucket. If you want a better hash code, then you would have
to implement that yourself (I would probably do something with the
width, height, rowbytes and maybe some other parameters of the image.
--
David Duncan
Apple DTS Ani
inside of -drawRect: and it should all be 100% related to
drawing the content of your view. You may read from various
properties, but you almost never set them.
--
David Duncan
Apple DTS Animation and Printing
___
Cocoa-dev mailing list
.
#import "StrokeView.h"
[self.view insertSubview:strokeViewClass atIndex:1];
totally doesn't work.
Where did you create the view? If you didn't create a view (either by
alloc/initWithFrame: or by adding it in a NIB and setting up an
outlet) then strokeViewClass is likely
es at <http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/MemoryMgmt.html
>
--
David Duncan
Apple DTS Animation and Printing
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comm
gnized selector sent to instance 0x530f10'
Are you building with the 2.2.1 SDK and running on the iPhone OS 3
simulator? Perhaps the other way around? Either way, it is not a
supported configuration (the simulator OS must always match the SDK
used).
--
David Duncan
Apple DTS An
ation just fine.
Please file a bug report on this issue.
One work around is to animate the contentsRect property instead of
contents and use the contentsRect to select a portion of a single
image that is assigned to the contents property of the layer.
--
David Duncan
Apple DTS Animati
underlying view is redrawn
with the added image. What's the convenient way to avoid the
flickering?
Set the final value of the animation on the layer when you add the
animation. You'll want to disable actions when you change the current
value of the layer as well.
--
David Duncan
enced from:
-[FlipsideView drawRect:] in FlipsideView.o
"_CGContextSaveGState", referenced from:
-[FlipsideView drawRect:] in FlipsideView.o
"_CGContextRestoreGState", referenced from:
-[FlipsideView drawRect:] in FlipsideView.o
"_CGContextSetFillColor", refe
here.
--
David Duncan
Apple DTS Animation and Printing
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/U
views override should call [super layoutSubviews] first.
--
David Duncan
Apple DTS Animation and Printing
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the moderato
hat are you trying to implement?
--
David Duncan
Apple DTS Animation and Printing
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(
not. About the only thing to keep in mind is that if you
do use a view controller, don't use the orientation change support.
--
David Duncan
Apple DTS Animation and Printing
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not
liar with that particular framework, but it is possible –
there are a lot of things that only work on the device.
--
David Duncan
Apple DTS Animation and Printing
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or
lower path on some devices.
- how you do it in OpenGL
You need to register for UIDevice orientation notifications and use
those notifications to rotate your modelview matrix.
--
David Duncan
Apple DTS Animation and Printing
___
Cocoa-dev mailing
se at least). By
default a view (or layer) is not redraw when it is resized, but the
content is scaled. You want to change the contentMode on the UIView if
you want it to redraw (and understand that there is a performance
penalty for doing this).
--
David Duncan
Apple DTS Animation and Pri
this task?
CGContextRotateCTM(UIGraphicsGetCurrentContext(), M_PI / 2.0);
[img drawAtPoint...];
--
David Duncan
Apple DTS Animation and Printing
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comme
a CGImage directly instead of going through a bitmap
context, as this gives you more flexibility in what types of image
data you can represent, as well as avoiding a trip through the kernel
to mark the memory for the bitmap context as copy-on-write.
--
David Duncan
Apple DTS Animation and
401 - 500 of 1008 matches
Mail list logo