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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T06:56:49+00:00 2026-05-15T06:56:49+00:00

See the code here @interface StaticView : UIView { Properties *prop; } @property (retain)

  • 0

See the code here

@interface StaticView : UIView {
    Properties *prop;
}
@property (retain) Properties *prop;
@end

and i am attaching this view via code

[super viewDidLoad];
StaticView *sView = [[StaticView alloc] initWithFrame:CGRectMake(0, 0, 320, 480)];
sView.prop.glowIntensity = 0.85f;

[self.view addSubview:sView];

but in my drawRect Method of StaticView i am always getting prop.glowIntensity = 0.0000

- (void)drawRect:(CGRect)rect {
        NSLog(@"%f", prop.glowIntensity);
} 

Here is my Properties.h

@interface Properties : NSObject {
    UIColor *bgColor;
    UIColor *foreColor;
    float glowIntensity;
}
@property(retain) UIColor *bgColor;
@property(retain) UIColor *foreColor;
@property float glowIntensity;

-(void) initbgColor:(UIColor *)bgC foreColor:(UIColor *)fC glowIntensity:(float) gI;
@end

here is implementation Properties.m

#import "Properties.h"

@implementation Properties

@synthesize bgColor;
@synthesize foreColor;
@synthesize glowIntensity;

-(void) initbgColor:(UIColor *)bgC foreColor:(UIColor *)fC glowIntensity:(float) gI
{
    self.bgColor = bgC;
    self.foreColor = fC;
    self.glowIntensity = gI;

}
@end

How can i pass right value to my StaticView class?

  • 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-15T06:56:50+00:00Added an answer on May 15, 2026 at 6:56 am

    It looks you do not create or set your view’s prop variable before using it – by default it equals nil and calling glowIntensity on nil object just returns 0.

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

Sidebar

Related Questions

This is a fairly weird case, you can see the code here: http://jsfiddle.net/zpZtH/2/
See here for code: http://jsfiddle.net/ecFBK/10/ I'm having a hard time getting this to work
So here's what I see this code doing: An array is made A loop
For some reason my bind events won't work. You can see my code here:
Here's my code. See the line that is commented out. When the element id
Here is the code relevant to my question: http://jsfiddle.net/mkerny45/V23NK/ As you can see there
I want to display html code just like what your see here. <textarea><script id=ff>gdgdgs</script></textarea>
I have some code that is using SyncEnumerator. As you can see here ,
See code just bellow Our generic interface public interface Repository<INSTANCE_CLASS, INSTANCE_ID_CLASS> { void add(INSTANCE_CLASS
See code below: I want Page 1 to alert #testing... This works in C

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.