Beware of pickpockets all over Barcelona, particularly strolling down Las Ramblas when you can be distracted looking at the street performers. I know a few people who had their money stolen.
Barcelona is a great city but, like most major cities, has its cons. Therefore you need to be aware of what to watch out for - I found this site very useful for safety tips http://www.barcelona-tourist-guide.com/en/general/barcelona-safety.html. Have fun - search this forum for more information.
Just another note on pickpockets be very careful if you are taking bus from air port to city .Friend I know was picked of 400 euro as they got on bus ,they join queque and pretend to be getting on bus then one slite push and your money is gone.
Safety-wise avoid the Raval and Barri Gotic in the evening. To be honest I would also avoid staying around Las Ramblas as it is teeming with people and pickpockets. But there are many beautiful areas in Barcelona - it is a wonderful city. You should have a fantastic time.
When I said avoid the Raval and Barri Gotic in the evening, that also means I do not think it's a safe place to get an apartment. Equally so with around Las Ramblas. Unless of course you are happy to get an apartment in a place where it is not safe in the evening.