Precipitation with NaI
The original solution contains the square planar $\ce{Pt(II)}$ complex ion $\ce{[Pt(NH3)4]^2+}$. When sodium iodide is added to the solution, one or more $\ce{NH3}$ molecules are replaced by $\ce{I-}$ ions in a ligand exchange reaction. In particular, replacing two $\ce{NH3}$ molecules with $\ce{I-}$ ions yields the neutral complex $\ce{[PtI2(NH3)2]}$, which is poorly soluble in water, and therefore a precipitate is formed.

Remarkably, two isomers of square planar $\ce{[PtI2(NH3)2]}$ exist: $\ce{$cis${-}[PtI2(NH3)2]}$ and $\ce{$trans${-}[PtI2(NH3)2]}$.
When starting from $\ce{[Pt(NH3)4]^2+}$, the first $\ce{I-}$ can replace any of the four equivalent $\ce{NH3}$ ligands. Because of the larger trans effect of $\ce{I-}$ compared to $\ce{NH3}$, the second $\ce{NH3}$ is preferably replaced trans to the first $\ce{I-}$ ligand and therefore the trans product $\ce{$trans${-}[PtI2(NH3)2]}$ is obtained.
(Note that, if one starts from $\ce{[PtI4]^2- }$ and replaces two $\ce{I-}$ ligands with $\ce{NH3}$, the cis product $\ce{$cis${-}[PtI2(NH3)2]}$ is obtained instead.)