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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:20:36+00:00 2026-05-26T08:20:36+00:00

this might look simple but i am not able to Find the solution for

  • 0

this might look simple but i am not able to Find the solution for this…when i use this below code the text get placed at right postion as mentioned in the CGRect frame.

[self.view addSubview:[self createLabel:CGRectMake(50,480,50,20):@”Status:”]];

-(UILabel*)createLabel:(CGRect)frame :(NSString*)labelTitle
{
  UILabel *myLabel = [[UILabel alloc] initWithFrame:frame]; 
  [UIFont fontWithName:@"Arial" size:13];  
  myLabel.textAlignment = UITextAlignmentLeft;
}

But when i use this below Code the text is getting placed at rightmost corner of the frame…its not getting placed at right position as mentioned in the CGRect frame..can anyone tell whats the problem happening with this..

[self.view addSubview:[self createLabel:CGRectMake(50,340,150,20):aRequests.request_details]];

NOTE:aRequests.request_details is coming from webservices..

  • 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-26T08:20:37+00:00Added an answer on May 26, 2026 at 8:20 am

    Your method doesn’t return any object. Try to add return myLabel; at the end of it.

    And you are not setting new title: myLabel.text = labelTitle;

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

Sidebar

Related Questions

It might look simple but i am not able to figure it out for
This might look like a beaten question, but could not find an answer at
All this might look too trivial but read it through - I have simple
This might look like a basic question to some of you but I expect
I'm not sure how to look for this online... I think they might be
This might seem obvious but I've had this error when trying to use LINQ
OK -this might be simple but i'm having trouble visualising where i need to
:) This might look to be a very long question to you I understand,
I have a table with rowID, longitude, latitude, businessName, url, caption. This might look
This might seem like a stupid question I admit. But I'm in a small

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.