Question: I have a view that I am performing a transform on

```
originalTransform = self.appContainer.transform;
self.appContainer.transform = CGAffineTransformMakeScale(.8, .8);

```

![Original Rotation](https://i.stack.imgur.com/wcLtt.png)

If I do not rotate the device I can revert this back to the original by using

```
self.appContainer.transform = CGAffineTransformScale(originalTransform, 1, 1);

```

Unfortunately, if I rotate the device, the transformation matrix for the view gets modified by the view rotation and breaks the original scale. If I undo the scale after rotation I am left with the `UIView` not returning to its original full size.

![After Rotation](https://i.stack.imgur.com/zUozj.png)

![After Original Scale](https://i.stack.imgur.com/fCTaA.png)

I'm sure that I need to make calculations between the original transformation matrix and the new one but I am unsure how to do this. The only thing I have been able to do to make this work is to revert the scale back to 1 before rotation

```
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    self.appContainer.transform = CGAffineTransformScale(originalTransform, 1, 1);
}

```

And then rescale it with the newly modified transformation after the 

```
-(void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation               {
    self.appContainer.transform = CGAffineTransformMakeScale(.8, .8);
}

```

This makes it work as I expect, but instead of going back to full screen, and then back to .8 scale, I'd like it to go from its new transformation to the correct .8 scale.

Answer: 
Instead of listening to 'tap' events on the tabs, you should listen to 'activeitemchange' on the tabpanel itself.
See <http://docs.sencha.com/touch/2-0/#!/api/Ext.tab.Panel-event-activeitemchange>
It works when listening/Query for the html-id generated by Sencha "ext-tab-2".

for Instance: 

```
config: {
    control: {
        "ptabpanel #ext-tab-2": {
            tap: 'onButtonTap'
        }
    }
},

```

But now the problem is how to change the "ext-tab-2" name generated by Sencha Touch 2

@Borck: thanks!.