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 8229005
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T16:39:09+00:00 2026-06-07T16:39:09+00:00

The title is fairly specific about what I want to do. I have a

  • 0

The title is fairly specific about what I want to do. I have a custom view and have drawn some elements inside that view. How do I change the autosizing properties programmtically? I have looked around and couldn’t find anything that would help me in my case.

Objective C:

- (void)drawRect:(NSRect)HTMLContent { 
    NSGraphicsContext* gc = [NSGraphicsContext currentContext];
    [gc saveGraphicsState];
    int height = [[NSScreen mainScreen] frame].size.height;
    int screenwidth = [[NSScreen mainScreen] frame].size.width;
    int emailInnerContentWidth = screenwidth - 510;

    // Horizontal Line
    [[NSColor colorWithCalibratedRed:.8 green:.82 blue:.83 alpha:1] setFill];
    NSBezierPath* drawingPath = [NSBezierPath bezierPathWithRect:NSMakeRect(337, 570, emailInnerContentWidth, 2)];
    [drawingPath fill];

    // Social Icon
    NSRect outrect = NSMakeRect(355, 585, 58, 58);
    [[NSColor lightGrayColor] setStroke];
    [[NSColor colorWithPatternImage:[NSImage imageNamed:@"NoSocialIcon.png"]] setFill];
    NSBezierPath* outcirclePath = [NSBezierPath bezierPath];
    [outcirclePath appendBezierPathWithOvalInRect: outrect];
    [[NSColor lightGrayColor] setStroke];[[NSImage imageNamed:@"NoSocialIcon.png"] drawInRect:outrect fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1];
    [outcirclePath stroke];

    // Restore graphics state
    [gc restoreGraphicsState];
}

I want to set these 2 shapes to not be affected by the bottom of the window changing. I want it to change when the top of the window changes height. I have looked on the Apple docs and nothing seemed to work. Thanks in advance

  • 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-07T16:39:11+00:00Added an answer on June 7, 2026 at 4:39 pm

    So, for each of the two shapes:

    [shape setAutoresizingMask:NSViewNotSizable | NSViewMaxXMargin | NSViewMinYMargin];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm fairly sure that's a useless title... sorry. I want to be able to
I have bunch of strings, some of which are fairly long, like so: movie.titles
Title said it all. Some context: I got a search mechanism - search view,
Alright, I have a fairly simple design. class Update(models.Model): pub_date = models.DateField() title =
I have a fairly simple SQL statement to get some results from a couple
So, I have a fairly typical app with UITableViewController 's inside of an UINavigationController
Let's say I have a fairly simple app that lets users store information on
I'm sure this title is fairly obscure. I'm wondering if there is some way
The title is fairly self-explanatory, but I'll reiterate: What would be a good variable
I think the title is fairly self explanatory, but to give a little context.

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.