Add support for IB

Add support for IB.

Fix frame issue when creating instance with nib.