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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T05:33:02+00:00 2026-06-01T05:33:02+00:00

Im trying this, but when i press it it dont changes, it only displays

  • 0

Im trying this, but when i press it it dont changes, it only displays text.
Also tried if else functions, but with no results.

.h

IBOutlet UIButton *poga1;
@property (nonatomic, retain)  UIButton *poga1;

.m

@synthesize poga1;

- (void)viewDidLoad
{
[super viewDidLoad];

[poga1 setTitle:@"My Title" forState:UIControlStateNormal];
[poga1 setTitle:@"My Selected Title" forState:UIControlStateSelected];

}
  • 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-01T05:33:03+00:00Added an answer on June 1, 2026 at 5:33 am

    Try this: If you added a title through the storyboard (the gui interface) then delete it.

    .h
    //create an IBOutlet action. How? You right-click the button and drag it to the .h file. A pop up happens and you need to click the drop down and switch it to action
    //should be something like

    - (IBAction)yourButton:(id)sender;
    
    .m
    //there will be a new function in your .m which is your button action function. 
    @synthesize poga1;
    
    - (void)viewDidLoad
    {
    [super viewDidLoad];
    
    [poga1 setTitle:@"My Title" forState:UIControlStateNormal];
    [poga1 setTitle:@"My Selected Title" forState:UIControlStateSelected];
    
    }
    
    - (IBAction)Start:(id)sender
    {
    

    /* if you want this to change the text each time it’s pressed then, you need a global counter that your increment each time the button is pressed. then you will have a if statement saying if the counter is equal to 1 (pressed once) then set title to hello, if the counter is equal to 7 (pressed 7 times) set title to goodbye. */

     [sender setTitle:@"whatever" forState:UIControlStateNormal];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically, I am trying this, but this only leaves array filled with zeros .
I am trying to do this but keep on failing. I have a text
i am really trying to do this but i am failing to find a
Im trying to get this working but for some reason it's just not right.
I'm trying to use this coding but its not processing, and its not outputing
I'm trying this code to access a property but it gives me an error:
I'm trying something like this, but this example does not work. jsObj = {};
Okay I been trying to work this out but unable too. I have a
I'm not sure how to describe this but I'm trying to create a base
I'm trying to work this function but I can't. My application hasn't got a

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.