I'm working on a project which needs a special text field to edit byte values. My current solution is a dedicated readonly textfield and a "..." button to open a popover as shown in the image below:
Now I try to make my solution more user friendly. My goals are these:
Currently I'm a little bit clueless. My questions are these:
I could implement everything using - (BOOL)becomeFirstResponder
as a hook to display the popover and observing the first responder to automatically hide the popover:
- (void)viewDidMoveToWindow
{
[super viewDidMoveToWindow];
[self.window addObserver:self forKeyPath:NSStringFromSelector(@selector(firstResponder)) options:0 context:NULL];
}
As a start point, I published a working project with the classes on GitHub (MIT License):