I have the following situation:
I'm extending `UITextView control (MyTextView : UITextView)`. I have different implementations according to the runtime device version. So currently I have many “if-else” statements in my implementation of `MyTextView` class.

In order to make it more maintainable, I would like to split it into different classes:

`MyTextViewIos5 : MyTextView`, `MyTextViewIos6:MyTextView`

and *to create a factory function which will know in runtime which subclass to create according to the device iOS version*.

This solution works perfectly if I'm using MyTextView as a parameter.

```
MyTextView* textView = [Factory createWithFrame:frame];

```

The problem begins when there is a class which inherits from `MyTextView (externalTextView:MyTextView)` and extends it with specific methods,
its `initWithFrame` method will look like this:

```
- (id)initWithFrame:(CGRect)frame {
    self = [Factory createWithFrame:frame];
    if (self) {
        ...
    }
    return self;
}

```

Instead of calling super `initwithFrame` I'm calling my factory.

When I call `externalTextView` specific method, the app crashes with an error that *MyTextViewIos5* or *MyTextViewIos6* does not implement the specific method that was called.

Is there a workaround for making it work?