make it works with pushViewController or presentViewController