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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T12:54:36+00:00 2026-06-13T12:54:36+00:00

hi i tried to create a delegate to backpass data from tableInterval to ElectricMeter

  • 0

hi i tried to create a delegate to backpass data from tableInterval to ElectricMeter uiViewController
but stil the delegate won’t fire.
this is my code
tableInterval h.file

@protocol updateIntervalDelegate
@required
-(void)intervalRefresh:(NSString *)interval;
@end


@interface tableInterval : UITableViewController<UITextFieldDelegate, MBProgressHUDDelegate>
{    
IBOutlet UILabel *IntervalLabel;
IBOutlet UILabel *EndLabel;
IBOutlet UILabel *StartLabel;
MBProgressHUD *HUD;
IBOutlet UIDatePicker *datePicker;
IBOutlet UITableViewCell *IntervalCell;
__unsafe_unretained id <updateIntervalDelegate> delegate;
}

@property (nonatomic, strong) UIActionSheet *actionSheet;
@property (nonatomic, strong) UITextField *interval;
@property (nonatomic, retain) NSURL *url;
@property (nonatomic, retain) NSString *StartDate;
@property (nonatomic, retain) NSString *EndDate;
@property(nonatomic, assign)id <updateIntervalDelegate> delegate;
@property (retain, nonatomic) NSString* noId;
-(IBAction)PreviousView:(id)sender;
-(IBAction)updateInterval:(id)sender;
@end

in m.file

@synthesize actionSheet,interval,url,noId,StartDate,EndDate,delegate;
[delegate intervalRefresh:interval.text];

calling the delegate method.

so this is in the implementation class .h file

#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#import "tableInterval.h"
#import "ListMeterCell.h"
#import "PopoverView.h"
#import "MBProgressHUD.h" 



@interface ElectricMeterController : UIViewController<UITableViewDelegate,UITableViewDataSource, PopoverViewDelegate,MBProgressHUDDelegate,updateIntervalDelegate> {
PopoverView *pv;
MBProgressHUD *HUD;
}

in .m file

-(void)intervalRefresh:(NSString *)interval{
NSLog(@"delegate fired!");

NSDictionary *copy=[updatedInfo mutableCopy];
[copy setValue:interval forKey:@"interval"];
[temp removeObjectAtIndex:path.row];
[temp insertObject:copy atIndex:path.row];

[self.MeterList reloadData];

}

so the nslog not fired, why? did i miss something here?

  • 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-13T12:54:38+00:00Added an answer on June 13, 2026 at 12:54 pm

    Did You set controllerName.delegate = self; ???
    I think that must be the only problem you should set the delegate first .

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

Sidebar

Related Questions

I have tried create this table, but nothing I have tried works from FKs.
I have tried this code to copy my data to plist but its not
I want to create a Comparison<>-Delegate via reflection in code. I have this: var
I have code like this: // Create event handler delegate symbolReader.ReadNotify += new EventHandler(symbolReader_ReadNotify);
I found this but tried to use it and failed. How can i create
I tried to create a code that adds 2 percent each time a component
I tried to create this by following the video at http://www.asp.net/learn/videos/video-7026.aspx where Joe Stagner
I havent found info on this subject yet, but maybe someone have tried doing
Possible Duplicate: Should I Create a New Delegate Instance? Hi, I've tried searching for
Following is the code I am using to create an AlertView. But the Ok

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.