I am trying to create a custom OSX login screen for Yosemite so that users can log in using a different mechanism (rather than just entering credentials from the keyboard). I am currently trying to achieve this by subclassing the SFAuthorizationPluginView class, as recommended in the Apple developer docs, and then putting my own logic, overriding the -(void)buttonPressed: . However, the documentation is rather vague and outdated. Therefore, I based my current implementation on a revised version of the NameAndPassword example.
This example works well and allows me to configure a single nib file and customize my own fields and buttons. My problem is that when the login screen loads my user view, it looks like it is connected to the parent container, which includes the default Yosemite login buttons. That would be great, except that the buttons contain both a title and an image, which leads to a rather confusing user interface. Now I have both my custom buttons and the default Yosemite buttons visible on my user login screen. Here is a screenshot.
I was looking for ways to access the Yosemite buttons so that I can remove or change them. So far, the only way to interact with these buttons is to call
[super setButton:SFButtonTypeLogin enabled:NO]
from my subclass, which toggles the enable flag of these buttons depending on the type of button you are going into.
I'm looking for ideas to either access these buttons by default, or cover them with my own view so that only my custom buttons are displayed. In addition, it is likely that this class does not work very well with Yosemite, since it is quite outdated. Let me know if someone has found a way around this.
source share