If you are trying to animate this rotation, you might want to read my answer to this question, where someone was attempting to animate an incremental rotation of a view. It turns out that incremental animation of a transform using CABasicAnimations is a little trickier than you would expect. You first need to read the current transform of your UIView's layer from its presentationLayer, then feed that into your animation as the fromValue.
However, in your case it appears that you are using a UIView animation block to animate the transform property of your view. The code as you have written it would only keep setting your view's transform to the same 90 degree rotation, it wouldn't incrementally rotate the view by 90 degree steps. To do an incremental rotation, I believe you'd need something like the following:
CGAffineTransform transform = CGAffineTransformRotate(shape.transform, M_PI / 2.0f);
shape.transform = transform;
which will grab the current transform of the view, rotate it by 90 degrees, and then apply the resulting transform to the view. Again, this may run into the same issues as with the CABasicAnimations, in which case you should consult the above-linked answer.