Hello.....my name is XXXXX XXXXX I will be happy to assist you with your electrical question
1) What type of switch is connected to the can lights? Single Pole ON/OFF or 3-Way's?
2) Do you have a 2-prong AC voltage tester or an AC voltmeter to test and confirm the hot/neutral feed originating from the breaker?
single pole on off. Positive that black wire coming from breaker is hot and white is neutral everything is new but wire to old switch and wire from it couldn't tell which color was which flipped breaker on and even though switch was offlights came on and when I flipped switch it popped breaker
are you working on my issue
Yes, hold on 1 more minute please
1) Do you have a 2-prong AC voltage tester or AC voltmeter to check and confirm the wires in the switch box?
no. if wires to switch were backward would they create the problem i discribed
1) If you are switching the neutral and it is connected back to the panel as a neutral, yes it will be the problem, especially if you have a hot feeding the switch and possibly a neutral connected as the switched leg going to the can lights.
2) The only way to confirm which wire is the correct is to test the wires with a 2-prong AC tester as this will measure which is the hot wire needed to feed the switch.
3) I assume your wiring is Romex? Is that corrrect?
Does your power feed from the breaker enter into the switch box or the ceiling?
If you are using Romex and a white wire for the switched leg, the white Romex wire needs to be re-identifed via black tape on it since it is now a hot conductor. See switch diagram below:
Below is another diagram showing the power feed coming into the wall switch box:
Note: On both diagrams, the white neutral wire is never switched, only the hot feed conductor is switched.