I wanted to remove the UITextInputAssistantItem that we see while editing the textfield. For which we need to set the leadingBarButtonGroups and trailingBarButtonGroups to empty array. But is resulting in leaks and app crashes, where their is extensive use of UITextField.
How to hide the shortcut bar in iOS9
self.textfield.inputAssistantItem.leadingBarButtonGroups=@[];
self.textfield.inputAssistantItem.trailingBarButtonGroups=@[];
In my current viewController, there is only two textfield and in viewdidLoad the above code, thats it. But, don't know why its resulting in leaks, its a headache for me when interface has many textFields.
From the above image we can see the leaks being generated on textfield beings editing.
If I set it to nil , instead of empty array, still I get the leaks.