Adding a utility function for attaching and detaching views.