I have recently gone through the video of WWDC 2016 - 806 (Design guidelines). In watchOS 3 there is now SpriteKit and SceneKit available.
Anyone tried making a custom component as iOS in watchOS. We can't subclass a interface. So, how is it possible to make custom components.
Custom components I mean to create custom sliders, buttons, etc.
As SpriteKit and SceneKit are available how can we create animation and custom views. Without using any image animations.
I have tried to search several places but can't find much resources and the animations mostly are done through images. So if anyone can help me would be appreciated.
Related
I'm currently developing a 2d mobile game for ios using SpriteKit as framework.
I made all animations with adobe after effects and now I have to import them into the app.
Instead of using sequence of texture as recommended by Apple and other tutorial, I read that there is an add-on for after effects named Bodymovin. It exports less frame and a .json file.
Then in Xcode I installed a pod named Lottie to make it works.
Well this is ok for UIViewController.
Someone know if there is a working way to export animations from after effects and make it work simply in SpriteKit?
Thank you
Its called Lottie animations, where you create your vector animations in After effects and download them as JSONs and import it in the iOS app and start using. But there are some serious restrictions to the method such as text effects won't work..
Have a look at the below - https://lottiefiles.com
There is another similar tool that generates core animation code named as Squall. This is a bit advanced than the Lottie. But this method also has its restrictions.
Here is the link for this tool - http://www.marcuseckert.com/squall/
In present situation, other than these two, you may be out of luck in bringing your animations from adobe after effects to sprite kit in iOS.
I would like to create an iPhone/iWatch app featuring a spinning wheel. The spinning wheel will allow the user to control the behaviour of the app and should be touchable; in other words other than spinning (long touch) the wheel should be able to detect short touches.
To design the architecture of this App I have a doubt: should I use UIImage view subclasses only or should I use SpriteKit and mix it with UIKit?
Example of spinning wheel.
Many thanks
On iPhone I've already done this by only using UIKit... And I didn't have any problem with it. So I would answer pure UIKit. On iWatch, I don't have the knowledge to answer you about this part.
You said you want to subclass UIImageView, but I don't think you want to do that. Instead, you should subclass UIView and manage UIImageView instances privately.
Also, if and only if you want to use SpritKit only for that component in your application, you should avoid using it because the less dependency you have, the more happy you are. But it's my personal thought about that.
Several years ago I was curious about creating some objects (spoon, ball, tv, ...) in 3d modeling program, export the textures, and then have a screen in iOS app, that can open one object at a time with a possibility to rotate and zoom it. This seemed quite basic and most used case but I didn't find any simple and ready to use solutions/libraries/plugins, just raw OpenGL ES (GlKit), so I refused to use it, as it would require too much knowledge and time as I haven't done any 3d stuff before and my primary work is not related with 3d.
There are also Unity and Cocos3d engines, and it looks like they allow to extend the code by using iOS plugins (xibs/storyboards, navigation with view controllers and etc), but this means you have to make your app project as Unity/Cocos3d first, and only then add your usual UIKit stuff as a plugin. Now that is not acceptable because the project should be written using UIKit first, and I expect to add 3d viewing stuff as a separate component that encapsulates all the necessary stuff inside it as a black box, because I don't want to mess my project up, as this 3d stuff is an optional feature.
Now, after several years I'v searched for the thing again looking for simple 3d viewing plugins/solutions for UIKit, but the situation is pretty much the same imho. I saw iOS8 there will add Scene Kit, but I'm not sure will it be something close to what I expect. So, still I'm not sure is there any solution that would require minimum time efforts, or is OpenGL ES the best solution for this need.
Check out the CC3DemoMultiScene demo app in the latest version of Cocos3D. It demonstrates how to include a Cocos3D scene in a standard UIKit storyboard, and to have the GL view only a component of a larger UIView.
Is it possible to develop an app mixing UIViewController and iOS specific API elements with Cocos2D views?
A Cocos2D app runs on a UIView and hence I guess it is possible to switch between one view (Cocos2D) and another (iOS), is this correct? Are there any good examples of apps doing this?
The core idea is to develop some graphical animations using Cocos2D and others using UIKit.
Actually you can add any UIView as a subview to CCDirector.sharedDirector().view anytime in a Cocos2D running app.
I bet the only reason you really should mix Cocos2D and UIKit is for creating menus and other UI in UIKit and run game scene using Cocos2D. To do that you can simply find a place where Cocos2D is initialized and replace it with your own UIKit things and then anywhere you want you can run a Cocos2D scene using the code you had replaced. If you want to do that the method you are looking for is
- (void) setupCocos2dWithOptions:(NSDictionary*)config
Maybe consider using SpriteKit since it won't increase the footprint of your app and is already in a very usable state. It uses the same concepts as cocos2d which makes it very easy for you if you know cocos2d already. Also it fits better in the UIKit environment.
So I am about to start a project for an application (Not a game application) that requires a lot of animation. For example a lot of pie and bar charts that animate on the screen.
If I use cocos2d am I still able to use UI elements such as UITableView, UIButton, UISegmentedControl, etc? Can you combine Cocos2d with normal iOS UI Elements on the same view?
Which one is better for creating simple animations?
What are the advantages and disadvantages of using each for a non-game project?
There is the ability to combine Cocos2d and UIKit, but I don't know to what extent you can take it. Check out this tutorial on combining them: http://www.raywenderlich.com/4817/how-to-integrate-cocos2d-and-uikit
I'm fairly new to iOS programming and did the same research you are currently doing for my project which is very animation heavy, but not a game. I found much more information, forums and tutorials on doing animations with Cocos2d than I did for Core Animation. Not to say it's not out there, or that 1 is necessarily better than the other for what you're trying to accomplish, just my 2 cents and several weeks of Googling.
Check out Core Plot maybe you can use that to build your app.