I am writing a swift playgroundbook on my MacBook, and I was wondering if it is possible to add tutorial animations between chapters like Apple does in "Learn to Code".
To create cutscene animations, make an HTML document and place it in Manifest.plist
Related
In iOS 7 some of the most important string drawing and metrics calculation methods were depracated with no obvious alternative given.
The page on NSString UIKit Additions Reference is red like blood. Almost everything deprecated. Xcode throws 300 warnings at me.
I try to find out what was running through Apples mind and what they changed in UIKit text system but where would I start? Did they mention somewhere why all of this is deprecated and how the text system works different now? And how to adapt? How to calculate text bounding box when label can scale the font to fit size? Is TextKit the solution?
I spent 3 hours on Google but I found no useful information on how to solve this problem.
We should document all alternatives here so all developers who run into this depressive deprecation mess find peace of mind quickly.
If you look at the deprecations, most of them deprecate the use of UIFont to use a dictionary of attributes instead.
drawInRect:withFont: (Deprecated in iOS 7.0. Use drawInRect:withAttributes: instead.)
drawInRect:withFont:lineBreakMode: (Deprecated in iOS 7.0. Use drawInRect:withAttributes: instead.)
sizeWithFont:(Deprecated in iOS 7.0. Use sizeWithAttributes: instead.)
etc…
So if you're looking for a place to start, learn how to use dictionaries of attributes to set up fonts. It looks like a lot of deprecations, but you don't actually need to learn that much new stuff.
If you want to update your code to use the new TextKit system, check out the WWDC videos and the TextKit Programming Guide.
If you want to know Apple's reason for deprecating so much, I'd guess that it has to do with how UILabel and UITextView used to be built on web views, now they're built on TextKit.
Hello I'm very new to OpenGlES and i have started to try to learn it with online tutorials... but in each tutorial they ask me to create a OpenGL ES Xcode project, and then edit EAGLView.h. But I can't find it. Is it just me or has Xcode 4 changed its location etc. Also, when I run the application it gives me two cubes... 1 red and 1 blue... spinning around. In some tutorials, there is simply a multicoloured box, not in 3 dimensions. Is it possible to go back to that?
Thanks
The sample application has changed significantly since the tutorials you are reading was written.
EAGLView, in its many incarnations, provided a UIView subclass that connected OpenGL to UIKit. As of iOS 5 there's no need for a custom class because of the introduction of GLKit. The modern OpenGL sample simply uses a GLKView, which is a built-in UIView subclass connecting OpenGL to UIKit.
What the sample actually shows has also changed to highlight the vector manipulation parts of GLKit that provide everything GL ES 1.1 supplied but which was cut from ES 2.0, and more.
If you want to work up from a tutorial, you're probably going to have to find a newer one. Searching for GLKit tutorials directly is probably the best idea — this one (amongst many others) looked like it covers mostly the modern stuff, for the sake of saying something rather than nothing.
Instead of EAGLView.h and m, they have moved all of the code into files named viewController.h and m.
If you have truly generated an "OpenGL Game" project as they are calling it in the newer versions of XCode!
In terms of the OpenGL code implemented to show the red and blue boxes etc... They have changed there sample code, you can from the m file put whatever you want there!!!
You can download sample code from here and work from that:
http://developer.apple.com/library/ios/#samplecode/GLES2Sample/Introduction/Intro.html
How would you go about creating a timeline animation for an iPhone or iPad application? I'm looking for something like a timeline animation in Flash. I don't need a technical explanation on how to program it, though.
So here are some general questions:
- I read something about UIView for PNG sequences, but aren't these kind of animations resource intensive? And what about filesize? PNG can't be compressed like jpeg.
- What about vector-like animations? These would save a lot of kb's.
- Are there animation frameworks like TweenLite/TweenMax/Tweener/... (some well known frameworks for animations in ActionScript) ?
- Any good references on how to make animations (like Text animations, ...)
Thanks in advance.
Bart
Apple pretty much spells it out in Getting Started with Graphics and animation.
In general just stick with the highest possible API, and test to see if it's going to meet your needs or not. Moving around a UIView or UILabel (text) as in a Timeline Animation not only takes just a couple of lines of code but it will probably perform just fine.
This only just came out, but have you heard of Hirameki?
It's a flash animation parser that lets you drop SWF animations directly into Xcode projects for iPhone. A demonstration and beta sign up is here http://www.flash-on-iphone.com
I simply want to link a label to a slider in order for it to display the current value of that slider. This is my first time working with Objective-C, and the problem seems far more complicated than in Java or C#.
This is the first thing you will see demonstrated in the Stanford CS193P videos on iTunes - if you want to do it in Interface Builder look no further.
I am fairly new to transition and animation methods in Iphone. Can somebody pl. guide me the basics of transition and Animation in Iphone. This is needed frequently in my Apps. Can anybody tell me any link where i can Understand ABC of animation ?
When it comes to Core Animation and UIView animations, you might want to look at Marcus Zarra and Matt Long's new book Core Animation: Simplified Animation Techniques for Mac and iPhone Development. It provides a very thorough walkthrough of Core Animation, from the high level UIView animations to more complex animations involving CALayers and CAAnimations. Bill Dudney also has an excellent Core Animation book.
As far as official documentation, the Core Animation Programming Guide is also well-written.
There are many questions here on Core Animation, tagged with core-animation.
Matt Gallagher has an interesting series of articles entitled "An Asteroids-style game in Core Animation".
Finally, I teach a course on iPhone development, in which I devoted a class to Core Animation and the neat things you can do in it. The course notes are available for download (VoodooPad format), and have quite a bit of detail in them, in addition to links to other resources and sample applications.