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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T11:54:42+00:00 2026-05-27T11:54:42+00:00

I used this star rating system at https://github.com/dlinsin/DLStarRating the gesture is working fine however

  • 0

I used this star rating system at https://github.com/dlinsin/DLStarRating the gesture is working fine however it dosen’t seem to be using the delegate correctly and therefore when I select a star the rating is not refreshing. Here is my code:

.main File

- (void)viewDidLoad
{

    NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];

    //check if value has been previously saved
    if( ![defaults stringForKey:@"username"] ) {        

        CustomerLogin *customerlogin = [[CustomerLogin alloc]
                                                  initWithNibName:@"CustomerLogin" bundle:nil];
        [self presentModalViewController:customerlogin animated:YES];
//        customerlogin.view.frame = CGRectMake(0, 0, 700, 900);
//      customerlogin.view.center = CGPointMake( 768/2, 1024/2);
        //[self.navigationController pushViewController:customerlogin animated:YES];

        [customerlogin release];


    }

    UIBarButtonItem * sortButton = [[UIBarButtonItem alloc] initWithTitle:@"Submit" style:UIBarButtonItemStyleBordered target:self action:@selector(Submit)];

    self.navigationItem.rightBarButtonItem = sortButton;
    [sortButton release];

    rating.delegate = self;
    comments.delegate = self;
    bestnight.delegate = self;

    UIColor *background = [[UIColor alloc] initWithPatternImage:[UIImage imageNamed:@"background_texture.png"]];

    self.view.backgroundColor = background;

    [background release];

    self.title = @"Write Review";

    [super viewDidLoad];

    //Star touch
    DLStarRatingControl *customNumberOfStars = [[DLStarRatingControl alloc] initWithFrame:CGRectMake(0,0, 320, 100) andStars:5];
    customNumberOfStars.backgroundColor = [UIColor clearColor];
    customNumberOfStars.autoresizingMask =  UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin;
    customNumberOfStars.rating = 3;
    [self.view addSubview:customNumberOfStars];
    [customNumberOfStars release];

}

-(void)newRating:(DLStarRatingControl *)control :(NSUInteger)rating 
{
    self.rating.text = [NSString stringWithFormat:@"%d star rating",rating];
}

.header file

#import "DLStarRatingControl.h"

@class Customer;
@class Place;

@interface CreateReview : UIViewController <UITextFieldDelegate,UITextViewDelegate,DLStarRatingDelegate>
{
    Customer*customer;
    Place*place;
    IBOutlet UITextField * bestnight;
    IBOutlet UITextView * comments;
    IBOutlet UITextField * rating;
    IBOutlet UILabel * testValueLabel;

    NSString * identifier;
    NSString * password;
    NSString * username;


}

@property (nonatomic, retain) IBOutlet UITextField * bestnight;
@property (nonatomic, retain) IBOutlet UITextView * comments;
@property (nonatomic, retain) IBOutlet UITextField * rating;
@property (nonatomic, retain) Customer*customer;
@property (nonatomic, retain) Place*place;
@property (nonatomic, retain) IBOutlet UILabel * testValueLabel;
@property (nonatomic, retain) NSString * identifier;
@property (nonatomic, retain) NSString * password;
@property (nonatomic, retain) NSString * username;

-(id)initWithPlace:(Place*)p;
-(void)newRating:(DLStarRatingControl *)control :(NSUInteger)rating;


@end
  • 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-27T11:54:43+00:00Added an answer on May 27, 2026 at 11:54 am

    It appears you aren’t setting the delegate for the DLStarRatingControl:

    try adding customNumberOfStars.delegate = self; when setting up your rating control

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

Sidebar

Related Questions

I'm using the source code found on this site here: http://webtint.net/tutorials/5-star-rating-system-in-php-mysql-and-jquery/comment-page-1/#comment-2562 A fantastic resource,
I am trying to write a star rating system in javascript that allows the
I guess you're familiar with the 5 stars rating system that's often used on
i used this link to build a basic jqgrid: http://haacked.com/archive/2009/04/14/using-jquery-grid-with-asp.net-mvc.aspx this my code: <script
Used this http://code.google.com/webtoolkit/doc/latest/DevGuideRequestFactory.html tutorial to understand the basic concepts, but having problems running my
I used this guide on Apple's website to enable PHP on my computer but
Till this moment I used this method to invoke: public string AddText { set
I used this code to print the current page: <form> <input type=button value=Print onClick=window.print();
I have used this in my HTML: <q> Hai How r u </q> Which
In my project i used this below function public function createIconMenu():NativeMenu{ var iconMenu:NativeMenu =

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.