iOS7 ui patches (3_1_X)

Backport of PR #108 and PR #109