Google it 'til you make it.
Google it 'til you make it.
That's what I'm envisioning anyway.
About 5 months ago I took a freelancing project that was an android tablet app. I had never programmed for android before(and had just a vague idea of what that environment was like). But I took the job anyway and assured them I could get it done in a timely manner. And 5 months later, I did, and I learned the android framework in the process.
I also had a similar experience during the summer of my 3rd year in university where I worked on a project for 2.5months where the most challenging part was user interface design. It was also a tablet-based project, but this was 2008, iOS and android had just barely come out and there were no tablet OSs. I used linux + python + pyglet and wrote my own UI toolkit. Likewise, I was out of my depths most of the time as I had never done anything remotely similar but at the same time I was never stressed out and confident I could get it done over the summer, and I did.
So I guess your experience isn't anomalous or unique(though probably quite rare). And I know at least another person, a very good friend of mine, who's also had a similar experience.