TNColorScrollViewController – easy scrollview with different color views

For a few iOS projects I needed a scrollview which had different UIViews with different background colors.  Because it came back regularly it became cumbersome to write the whole thing over and over again.  So yesterday I created a view controller which takes away the pain of writing it.

You can find the code on Github with a demo project on how to use it, but the steps are easy.

  1. Create an array with TNColorViewData objects and give it a background color or a reference to a custom UIView class (this class has to subclass TNColorView)
  2. Create a config object in which you add the array and have the possibility to set some extra properties so the view controller knows how to behave
  3. Present the view controller
  4. There is no step 4

If you have any requests, just put them in the comments or add an enhancement in the GitHub issue tracker!

Call methods on Unity3D straight from your Objective-C code

The problem

So you want to trigger functionality in your Unity3D scene straight from your native Objective-C code?  For example you have different scenes, and you want a regular iOS component (e.g. UIButton) to trigger a new scene. It takes some work, but it is doable.

tl;dr

Read it … bitch 🙂

The solution

Unity exposes a way to call code in your Unity3D project (normally this will be javascript or C#).  There are 3 components you need to get in place.

  1. Have a Unity3D scene
  2. Have a Unity3D script
  3. Have an Objective-C class

The way it works is that you can bridge your code from Objective-C to C# or Javascript in Unity3D with the ‘UnitySendMessage’ method.

Continue reading Call methods on Unity3D straight from your Objective-C code

Add Unity3D in a native iOS application

I HAVE CREATED A NEW WAY TO INTEGRATE UNITY WITHIN AN EXISTING IOS APP. YOU CAN FIND THE POST HERE.

The problem

For a project I need to implement an augmented reality feature inside a native iOS application.  We chose to go with Unity3D and Vuforia to do the augmented reality bit, as it’s free and lots of people are saying it’s the best solution. The only problem when working with Unity3D is that the exported iOS project is not easy to implement in an existing project as we only need Unity3D for 2 views inside a project with some dozen other native UIViews. Continue reading Add Unity3D in a native iOS application