It is very important to make staying arrangement of the residents of the slums before demolishing the slums. Then we can build the apartments in the place of the slums. You can refer Slums are transformed into residential projects. It is a good example of transforming a slum area to an apartment complex.
To do so, first of all we need to make the residents of slums convinced on the matter that conversion of slums to residential apartments will enhance the lifestyle of them.
Once they agreed arrangements needs to be made for their staying and then construct the apartments in the place of the slums.