implemented desired features both for iPhone and iPad.
added gitignore which has been forgotten as usual.