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

  • Home
  • SEARCH
  • 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 8459855
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T13:26:37+00:00 2026-06-10T13:26:37+00:00

Is it possible to create a fully customized alert? I’m doing it with custom

  • 0

Is it possible to create a fully customized alert? I’m doing it with custom sheets now, but I’d like to have the feature that the sheet is blocking (like -[NSAlert runModal]).

I just want to change the background, really, and the text color, of course.

  • 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-06-10T13:26:39+00:00Added an answer on June 10, 2026 at 1:26 pm

    Warning about the recommended solution:

    This code causes wasteful and pointless overhead:

    for (;;) {
        if ([NSApp runModalSession:session] != NSRunContinuesResponse)
            break;
    }
    

    This code is copied straight from the Apple documentation page – but it’s meant to show the developer where meaningful code can be inserted for background execution while the modal runs. That is, you should have some code between the break and the closing bracket. But there’s no actual code shown in the example – and running it like this simply causes your application to poll the session repeatedly until it ends. It’s like the two-year-old in the back seat of the car on a road trip asking, “Are we there yet? Are we there yet? Are we there yet?…”

    If you just want straightforward modal execution, where your application presents a modal window and suspends processing of main / background windows until the modal ends, use this:

    [NSApp runModalForWindow: self.window];
    

    …and then exit the modal session when the window closes by dropping this into your window controller subclass:

    - (void)windowWillClose:(NSNotification *)notification {
        [NSApp stopModal];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Create an alert on any view controller after Facebook request:didFailWithError: I have
I want to create a custom container that supports iterators. It looks like this:
I want to know that is it possible to create a fully portable virtual
Hi it'd like to know if it's at all possible create a parametric equalizer
Possible Duplicate: Create event handler for OnScroll for web browser control I would like
I'm now learning Tcl/Tk, but as I'm running Windows, I want to create a
I don't own a mac, is it possible to create a fully functional video
I have a question about tags for UIViews. Is it possible to create your
Is possible to create a fully-featured REST server with Ruby (not Rails)?
I would like to create custom slugs for pages in my CMS, so users

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.