SALE: Save 50% on all my books and bundles >>

Mixing SpriteKit and UIKit?

Forums > Swift

@miff  

Is it good or bad to mix these two?

I don't mean placing Views over SKView, more like (for example: Clash Royale, Archero...) UITabBarController with some views (Shop, Battle, Acheivements...), where the Shop is classic collection view and battle is SpriteKit Scene?

Thanks

   

I mean why not if these is reason to.

The SpriteKit scenes themselves are hosted in specialized UIViewControllers and since UITabBarController is just a container for other UIViewControllers, I dont see why it would be a bad idea to have SpriteKit scene on one tab and item shop on the second :-)

   

@miff  

Yes, I have the same opinion. But i never find example or anything similar...

Almost three months I develop some game (for client), and when we started to "mix", cpu, memory and energy rise up a lot. So I found on SO, some advices that is not good to mix... make no sense to me also... but it's always better to ask for second opinion :)

   

To be honest I dont have much experience in SpriteKit but it should be very performant and I dont see better solution than to mix them. SpriteKit is great for games but for building UIs not so much.

1      

I think I might have to do something similar with my current project. I found Paul's Spritekit tutorials on Hacking with Swift very helpful and interesting ...

It's also very easy to mix and match the two!

   

   

Hacking with Swift is sponsored by RevenueCat

SPONSORED Building in-app subscriptions are hard. RevenueCat makes it simple. With their open source SDKs, you can painlessly implement subscriptions for your app in hours, not months.

Explore the docs to learn more

Sponsor Hacking with Swift and reach the world's largest Swift community!

Reply to this topic…

You need to create an account or log in to reply.

All interactions here are governed by our code of conduct.

Cascable unleashes the power of your camera and unlocks powerful workflows for shooting, managing, and geotagging your photos.

 
Unknown user

Not logged in

Log in