'Buttons working in ios6 stopped working in ios5

  1. I load two buttons in one view from the NIB.
  2. I set this view as self.navigationItem.rightBarButtonItem in current viewController
  3. I set actions for these buttons

Result:

Buttons work under ios6 - both simulator and device and not working on ios5 device. Any idea to fix it?



Solution 1:[1]

I fixed it by set "Autosizing" in "Size inspector".

(in my case, the problem came from resize iPhone5 to iPhone4)

Solution 2:[2]

The problem is now solved. This was caused by setting UIViews objects in IB and then setting its class to UIButton. It should have no effect on buttons behaviour, but it had. The more wired was that it did work on iOS 6 and did not in iOS 5.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2 pro_metedor