2. As shown in Figure $1, I$ is the incenter of isosceles right $\triangle A B C$, and $IE$, $IF$ are the angle bisectors of $\angle A I C$ and $\angle A I B$ respectively. If the hypotenuse $B C$ $=2, A I$ intersects $E F$ at point $P$, then $I P=(\quad)$.
(A) $\sqrt{2}-1$
(B) $\sqrt{2-\sqrt{2}}$
(C) $1-\sqrt{2-\sqrt{2}}$
(D) $1-\frac{\sqrt{2}}{2}$
2.C.

As shown in Figure 1, let $A I$ intersect $B C$ at $D$. Then $\frac{I D}{A D}=\frac{1}{\sqrt{2}+1}=\sqrt{2}-1$. Given $A D=1$, we have
$$
\begin{array}{l}
I D=\sqrt{2}-1, I A=2-\sqrt{2}, \\
I C=\sqrt{I D^{2}+C D^{2}}=\sqrt{4-2 \sqrt{2}}, \\
\frac{A E}{C E}=\frac{I A}{I C}=\frac{2-\sqrt{2}}{\sqrt{4-2 \sqrt{2}}}=\frac{\sqrt{2-\sqrt{2}}}{\sqrt{2}}, \\
\frac{A E}{A C}=\frac{\sqrt{2-\sqrt{2}}}{\sqrt{2}+\sqrt{2-\sqrt{2}}}, A C=\sqrt{2} .
\end{array}
$$

Thus, we have
$$
\begin{array}{l}
A E=\frac{\sqrt{2} \cdot \sqrt{2-\sqrt{2}}}{\sqrt{2}+\sqrt{2-\sqrt{2}}} \\
=\frac{\sqrt{2} \cdot \sqrt{2-\sqrt{2}}(\sqrt{2}-\sqrt{2-\sqrt{2}})}{\sqrt{2}} \\
=\sqrt{4-2 \sqrt{2}}-2+\sqrt{2} \text {, } \\
A P=\frac{A E}{\sqrt{2}}=\sqrt{2-\sqrt{2}}-\sqrt{2}+1 \text {. } \\
\end{array}
$$

Therefore, $I P=I A-A P=2-\sqrt{2}-(\sqrt{2-\sqrt{2}}-\sqrt{2}+1)$
$$
=1-\sqrt{2-\sqrt{2}} \text {. }
$$