If #\tan A = tan B#, then #A-B = n\pi#, where #n \in \mathbbZ#. Since you can write the given equation as #\tan (\frac{\pi}2 \sin \theta ) = \tan (\frac{\pi}2 - \frac{\pi}2 \cos \theta)#, we have that #\frac{\pi}2 \sin \theta - \pi/2 + \pi/2 \cos \theta = n \pi#, or #\sin \theta + \cos \theta = 1/2 + n#, where #n \in \mathbbZ#.
Of course, #\sin \theta + \cos \theta# can only lie between #-\sqrt2# and #\sqrt2#, so the only possible values are at #n = 0# and #n = -1#, and they are #1/2# and #-1/2#. That's it!