Didn't work this block why?

Can anyone’s tell me this block Didn’t work..app not close after denied button click..what i do??? please help

this post just for permission granted,not permission denied solution!