Tried another approach using a delegate class as in the apple example. Working well, but with no ARC and old syntax