IPAD must-haves. And fun-to-haves.

Brighten your iPad with a colorful cover, stream to your TV, download pictures from your digital camera, and more. There’s already so much you can do with iPad and iPad mini

Apple Wireless Keyboard

The incredibly thin Apple Wireless Keyboard uses Bluetooth technology, which makes it compatible with iPad

Apple unveils iPad mini: ‘Thin as a pencil, light as paper’

iPad inspires creativity and hands-on learning with features you won’t find in any other educational tool

Lightning connector and FaceTime HD camera

Apple announces 4th generation iPad packing an A6X CPU

Pages

Showing posts with label responder. Show all posts
Showing posts with label responder. Show all posts

Sunday, January 13, 2013

Resign from being the first responder for the NSFontmanager

Hi All,

 

I have preference window ( accessed thruough preferences menu) where I let the user set the font and color for text displayed in my main window. This all works fine, as I have overidden the ChangeFont method.  Here is the code I have used:

 

    // request to display the font panel, received from the preference window

- (IBAction)displayFontPanel:(id)sender{

   

    NSFontManager *fontManager = [NSFontManager sharedFontManager];

             

    NSFontPanel *fontPanel = [fontManager fontPanel:YES];

    [fontManager setTarget:self];

    [fontPanel makeKeyAndOrderFront:sender];   

}

 

    // font change : received when font is changed in the preference window

- (void)changeFont:(id)sender {

     

    titleFont = [sender convertFont:titleFont];

    [self UpdatePrefWindow :titleFont];

    [self appPreferences:updatePlist];

}

 

The issue  now is that all other text fields and text views in my main window are not able to receive the changeFont message. What I am trying to do is to resign from being the first responder once the preference window is deactivted and become the first responder again when it is achitvated.  Any ideas.

 

Thanks

 

Rashid


View the original article here

Resign from being the first responder for the NSFontmanager

Hi All,

 

I have preference window ( accessed thruough preferences menu) where I let the user set the font and color for text displayed in my main window. This all works fine, as I have overidden the ChangeFont method.  Here is the code I have used:

 

    // request to display the font panel, received from the preference window

- (IBAction)displayFontPanel:(id)sender{

   

    NSFontManager *fontManager = [NSFontManager sharedFontManager];

             

    NSFontPanel *fontPanel = [fontManager fontPanel:YES];

    [fontManager setTarget:self];

    [fontPanel makeKeyAndOrderFront:sender];   

}

 

    // font change : received when font is changed in the preference window

- (void)changeFont:(id)sender {

     

    titleFont = [sender convertFont:titleFont];

    [self UpdatePrefWindow :titleFont];

    [self appPreferences:updatePlist];

}

 

The issue  now is that all other text fields and text views in my main window are not able to receive the changeFont message. What I am trying to do is to resign from being the first responder once the preference window is deactivted and become the first responder again when it is achitvated.  Any ideas.

 

Thanks

 

Rashid


View the original article here

Saturday, January 12, 2013

Resign from being the first responder for the NSFontmanager

Hi All,

 

I have preference window ( accessed thruough preferences menu) where I let the user set the font and color for text displayed in my main window. This all works fine, as I have overidden the ChangeFont method.  Here is the code I have used:

 

    // request to display the font panel, received from the preference window

- (IBAction)displayFontPanel:(id)sender{

   

    NSFontManager *fontManager = [NSFontManager sharedFontManager];

             

    NSFontPanel *fontPanel = [fontManager fontPanel:YES];

    [fontManager setTarget:self];

    [fontPanel makeKeyAndOrderFront:sender];   

}

 

    // font change : received when font is changed in the preference window

- (void)changeFont:(id)sender {

     

    titleFont = [sender convertFont:titleFont];

    [self UpdatePrefWindow :titleFont];

    [self appPreferences:updatePlist];

}

 

The issue  now is that all other text fields and text views in my main window are not able to receive the changeFont message. What I am trying to do is to resign from being the first responder once the preference window is deactivted and become the first responder again when it is achitvated.  Any ideas.

 

Thanks

 

Rashid


View the original article here