Posts

Post marked as solved
3 Replies
With fresh eyes, I realized that I was "closing" the path, which was my problem. A silly mistake...
Post not yet marked as solved
5 Replies
I've re-read the articles several times but I can't say I have a firm grasp of the "why". It's probably something that I will just have to accept and over time it'll make more sense...but I don't think I will be fully understanding it today. Many others seem to have gotten it...eventually I will too.Apple's archive documentation is somewhat helpful as well:https://developer.apple.com/library/archive/documentation/WindowsViews/Conceptual/ViewPG_iPhoneOS/WindowsandViews/WindowsandViews.html#//apple_ref/doc/uid/TP40009503-CH2-SW1"If you change the origin of the bounds rectangle, anything you draw inside the new rectangle becomes part of the view’s visible content."I change the origin of the bounds rectangle but I'm not drawing anything. But, I'm effectively moving the bounds rectangle down below the label to an area where there is nothing to display which is why "the view's visible content" changes.I found that "setting the superview’s clipsToBounds property to YES" made the label disappear during the animation which helps with the conceptualization of what's happening.I appreciate the discussion and your patience.
Post not yet marked as solved
5 Replies
I didn't expect the label to animate opposite to the direction that I was moving the coordinate with animation. I didn't know what to expect. But, if I had to guess how it would react, I would have expected that the label would not move. Clearly I'm wrong...I have read the bounds and frame documentation, as well as reading the article and slide you provided, but none of them explain what should happen when a bounds origin coordinate is animated as I have done.I understand that if I want to move the view itself within its subview, then moving the frame is the way to go.I'm still confused, though, about the effect when I animate the bounds origin coordinates.If bounds origin y is 0 to start with and changes to 50, that would mean the bounds origin is moving down and the bounds rectangle moves down. Yet, the label inside of the view moves up. I'm missing something and still need a different explanation of the effect.
Post marked as solved
5 Replies
I understand how threading works and that each animation block is threaded separately.I agree that there are workarounds and better ways for what I'm trying to do (completion blocks or keyframes) but I don't agree the code I proposed to use is plain wrong and shouldn't work. Yes, the engine interprets my code as "overlapping contradictory" and negates the first 3 animations but logically it should work...there is no overlap or conflict in terms of time-based sequencing which is why I'm questioning its legitimacy. Without documentation that says "don't do this or else you'll have this effect", developers are left to their own interpretation. If the engine is not designed to do what I'm proposing it does, then fine...I can live with adjusting my code. But the documentation needs more detail and is currently lacking. I'm looking for a higher standard of developer documentation or a "smarter" engine...not just from Apple, but from all vendors.I appreciate the discussion...I have filed a bug report and I'll see what comes out of that.
Post marked as solved
5 Replies
Yes to both of your question...fade in and fade out.Thanks for the suggestion and sample code fix. The completion on the last animation blocks works. I also found that using keyframes is another method that lets me stack several animations into a block and the end result is the same.Regarding your comment about optimisations, can you provide a link where this is documented? The directives I have in my original code are clear in that the last (fourth) animation block should be delayed until after the third one completes. Therefore, the "optimisation" that the engine is doing that is causing the unintended effect is actually incorrect and I would argue that my code should work...unless the documentation clearly says this is not supported.