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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T07:44:20+00:00 2026-06-17T07:44:20+00:00

UIImage * imageSetting= [UIImage imageNamed:@setting-button]; UIImageView * imageView = [[UIImageView alloc]initWithImage:imageSetting]; self.editSettings = [[UIBarButtonItem

  • 0
UIImage * imageSetting= [UIImage imageNamed:@"setting-button"];
UIImageView * imageView = [[UIImageView alloc]initWithImage:imageSetting];
self.editSettings = [[UIBarButtonItem alloc]initWithCustomView:imageView];
PO(self.editSettings);

In Addition:

self.editSettings = [[UIBarButtonItem alloc]initWithBarButtonSystemItem:UIBarButtonItemStylePlain target:nil action:nil];
PO(self.editSettings);

In both cases self.editSettings return null.

So, PO(self.editSettings) return null

  • 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-17T07:44:21+00:00Added an answer on June 17, 2026 at 7:44 am

    You don’t show this in the question but this behaviour could be explained by editSettings being a weak property. If you assign directly to a weak property from an initialisation, ARC will remove the object since nothing has a strong pointer to it.

    Either use a local variable to create the bar button item, then make sure you add it to a toolbar or navigation bar before it goes out of scope, or change the property to strong.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

UIImage *image = [UIImage imageNamed:@logo_header.png]; UIImageView *imageView = [[UIImageView alloc] initWithImage:image]; imageView.frame = CGRectMake(0,
UIImage *rightIcon = [UIImage imageNamed:@fb.jpg]; UIBarButtonItem *btnFB = [[UIBarButtonItem alloc] initWithImage:rightIcon style:UIBarButtonItemStylePlain target:self action:@selector(FBConnect)];
UIImage *img = [[UIImage alloc] initWithContentsOfFile:@contactHeader.png]; _headersView = [[UIImageView alloc] initWithImage:img]; I have already
I have these codes: UIImage * img = [[UIImage alloc] initWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:IMAGEURL]]]; [self.imageView
[self.distanceSlider setThumbImage:[UIImage imageNamed:@handle-slider] forState:UIControlStateNormal]; Let's take a look at that code. If I use
UIImage *img=[[UIImage alloc]initWithFrame:CGRectMake(50,50,145,20)]; img.image=[UIImage imageNamed:@dollor.png]; I get the error Request for member image in
UIImage *img = [[UIImage alloc] initWithContentsOfFile:@xx.jpg] UIImage *img = [UIImage imageNamed:@xx.jpg] In the second
UIImage *image = [[UIImage alloc] initWithData:data]; ((YKSubCategory *)[_subCategories objectAtIndex:connection.tag - 1]).menuImage = image; [image
I'm replacing an uiimage of uiimageview before calling NSURLConnection sendSynchronousRequest, an as a result
I have a UIBarButtonItem in IB That button has selectors. Things work fine but

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.