An improved target field method is proposed for the cylindrical coil design to meet the constraint of limited coil volume. It realizes the design of uniform magnetic field coil by predetermining the coil configuration and optimizing the coordinate positions of the target field points. Compared with conventional methods, this current density distribution is divided into two symmetric subregions to solve the problem of reserving a gap in the coil center for setting the light-passing holes. Therefore, this method is more applicable in the miniature atomic devices with optical paths. Moreover, the overall coil performance can be significantly improved using the optimized configuration of coil design parameters. The numerical evaluation shows that the coil designed by this method has remarkable advantages over the nested saddle coil, whose uniformity performance can be improved by about one order of magnitude. The measurements show that the relative magnetic field uniformities of the proposed coils reach $4\times 10^{-4}$ and $3\times 10^{-4}$ along the z-axis in the range of $\pm 0.24~R$ . The measurement results match well with the theoretical simulation.