5 is the exact number of icons that fit perfectly into a UITabBarController, providing an easy way to switch between views that conforms to the Apple iPhone Human Interface Guidelines, and will be very familiar to iPhone users.
Here's a video showing how to create an App with a UITabBarController:
http://www.screentoaster.com/watch/stVUpUQEVLQVteRl1eXFxf/iphonedev_101_uitabbarcontroller
If you still feel you really need to have something that looks like the OS X Dock, I'd recommend using Core Animation.
Create a custom view, and in the init code, add a CALayer for each dock icon. Implement the touchesMoved event to detect finger position, and modify the bounds and position properties for your icon layers to move/resize them. You'll have to fine tune your algorithm for adjusting icon sizes and the animation mode you use to try and match the behavior in OS X, but I believe it's just a linear distortion based on the distance from the cursor (or finger in this case).
Implement code to reset the icons to their default position, and launch whatever action you want for your icons in touchesEnded.
To bounce the icons, you could try animating the position using a CABasicAnimation with the kCAMediaTimingFunctionEaseInEaseOut timing function, and repeating and autoreverse enabled.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…