1

I have two separate projects:

one that has png animations set by a timer and counter to keep looping when the user presses start/stop (swift).

The other detecting when the user blows into the iPhones microphone (objective c).

I want to join both of these so that the microphone detection triggers the animation to play and stop. Can anyone advise on the best way to do this, I have started by creating a viewcontroller.swift in my microphone detection project & using a bridging header to do so. I am unsure of how to proceed with inputting the animation code, which file it goes in, how to link the swift and objective c files etc?

Thanks in advance.

mrh28
  • 21
  • 3

1 Answers1

0

You can just drag the .m file into the Xcode project next to the Swift file. Then Xcode will take care of everything.

Then just use the one class from the other's file.

uliwitness
  • 8,532
  • 36
  • 58
  • ok thanks I have moved my .m file into my animation project. Do you have any idea how I would get the two to work together, whether i do that in the .m file or .swift? – mrh28 Apr 28 '17 at 16:27