Actual layout seems to be pure Apple for the A6 and A6X, and Samsung is "just" the fab. P.A. Semi and Intrinsity are companies that specialized in doing just this, laying out an optimizing processors for high performance. Apples people behind these companies did this for designs like StrongARM, DEC Alpha and even Samsung's Hummingbird Cortex-A8 core. So they are experts, and they are experts at using different fabs for their designs.
Apple does have a full ARM architecture license, not just certain design macros like stock Cortex cores or Mali GPUs, just like Qualcomm does its own thing. That's why they could design their own ARMv7 based Swift core for the A6 family, which is something in between Cortex-A9 and A15. The GPU design comes from Imagination Tech of which Apple owns about 10%. Apple have in-house accelerators on these chips for image processing and video processing, and other blocks like memory management and bus interfaces are probably stock ARM stuff or something tweaked. They do have a large department doing this, and they do have about 30 years of doing custom chips.
And on top of that. TSMC have been very keen on getting Apple's business ever since Apple started contracting Samsung for custom deigns rather than using Samsung's stock ARM SoCs talks have been with TSMC for doing the fabrication. And that's 5 years ago. I know that TSMC's reputation isn't all that great, but they do have had a lot of years proving themselves to Apple and they have probably done trial runs for every design Apple's come up with the last several years. When Apple thinks they are ready, they get the contract.