Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6214537
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T06:53:45+00:00 2026-05-24T06:53:45+00:00

I am trying to get a custom cursor for my OSX application. I’ve read

  • 0

I am trying to get a custom cursor for my OSX application. I’ve read about doing this without success for the last few hours. So i’ve moved to the simplest aspect, simply setting the current cursor as the crosshair cursor, in a project that has absolutely nothing else.

Here is the most basic setup which does not change the cursor for me. Using XCode, I made a new Cocoa project. The only piece of code I wrote is one single line in the following function.

- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
        [[NSCursor crosshairCursor] set];
}

This does not change the cursor, which probably means I am missing something extremely basic, but cannot figure out for the life of me.

I tried many variations, using the NSCursor -push method to change the current cursor, and it does not work. I also tried putting an NSButton and then doing as a different answer suggests here (where button is of the type NSButton *):

[button addCursorRect:[button bounds] cursor:[NSCursor crosshairCursor]];

I’ve written a couple apps for the iPhone before, but never for the Mac, but it seems pretty similar. Am I missing something hopelessly stupid? I also tried playing with the addCursorRect:cursor: method, but I’m not sure I did it right. It wasn’t clear what function is supposed to call it, and from where.

Once I figure out how to show ANY different cursor, then I want to move on to making my own images for the cursor.

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T06:53:46+00:00Added an answer on May 24, 2026 at 6:53 am

    I’m not sure why, but setting the cursor in applicationDidFinishLaunching doesn’t seem to work. (I just tried it.) But it will work if you do it later, like as the result of clicking a button or maybe use a timer if you want it to happen at launch.

    - (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
        [NSTimer scheduledTimerWithTimeInterval:0.1 target:self selector:@selector(timer:) userInfo:nil repeats:NO];
    }
    
    -(void)timer:(id)foo
    {
        [[NSCursor pointingHandCursor] set];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to get a custom cursor for my WPF application. I already
I am trying to get my Blackberry application to display a custom modal dialog,
I'm trying to get a completely custom Dialog or PopupWindow, without any of the
Trying to set up a gridview with a custom adapter, I get my cursor
I have a asp.net mvc application and am trying to get custom errors working
Trying to get this custom pager to work for jQuery Cycle. I want the
I'm trying to add a custom cursor to a C# Winforms application as an
Trying to get custom Done button in Utility Application Create new project in Xcode
I'm trying to get custom HttpHandler working in my sample web application. I've been
I'm trying to get a custom handler to work for a specific URL (or

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.