Swift Xcode error

I do not learn Xcode IOS development from codecademy but I really need help before i can continue. I am a new learner to mobile (ios) development. Ofcourse, i have basic knowledge of swift. i recently learned about constraints, how to insert and customise button and stuff. Now, when I open the assistant editor to drag the button to add a function for it, IT DOES NOT WORK. forget dragging, it doesnt let me type or remove any text. its like a only-view file. when I try to type it shows a white flash and that macbook error sound, like when u have only opened the desktop and u press random keys. I have been stuck on this issue and cant continue learning