In the past i have done subclassing of UITableView and UICollectonView
many times, in which i have assigned self to the delegate and datasource, and it worked fine.
Today i tried to make subclass of UITextField
and in that I am assigning self to its delegate as
self.delegate = self
where delegate is inherited from UITextFiled
.
In above case this is hanging the App forever in iOS 7, but works for iOS 8.
Another surprising thing is, when i try to input the text in it from Hardware keyboard then it works fine but it get hanged on typing characters from On-Screen keyboard.
What may be reason of this, Can any one help me to understand?
I was having a similar issue and I figured it out. The simulator will not raise the keyboard by default anymore. If there is a hardware keyboard available and detectable (for example on a MacBook) the simulator will look for input from it and the simulated iPhone keyboard will not raise. This gives the appearance of a problem with the delegate. All you have to do is in the Simulator's Hardware menu, under Keyboard, unselect the option for "Connect Hardware Keyboard". I hope this helps.