iOS helpful pieces of code