hi everyone,
i encounter the following issue, where i have 1 UIView (FirstView) call another UIView (SecondView), then after that i would wanted to update the variable in the firstview and refresh the first view but i seems not able to find a way to do it, can anyone guide me on that?
FirstView.h
FirstView.m
(I display the second view using the addsubview method)
SecondView.m
(After user complete the task, they click a button
i not able to use the below method because the xcode told me it will not response to the delegate method...
FirstView *delegate = (FirstView*)[UIApplication shareApplication] delegate];
[delegate.arrTaskList removeObject:0];
can anyone guide me a direction on how to accomplish this?
thank you...
i encounter the following issue, where i have 1 UIView (FirstView) call another UIView (SecondView), then after that i would wanted to update the variable in the firstview and refresh the first view but i seems not able to find a way to do it, can anyone guide me on that?
FirstView.h
Code:
@interface FirstView : UIViewController <UIApplicationDelegate, UITableViewDataSource, UITableViewDelegate>{
NSMutableArray *arrTaskList;
}
@property(nonatomic,retain) IBOutlet NSMutableArray *arrTaskList;
@end
FirstView.m
(I display the second view using the addsubview method)
Code:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
if (indexPath.row == 0)
{
SecondView *vwSecView = [[SecondView alloc] init];
[self.view addSubview:vwSecView.view];
}
}
SecondView.m
(After user complete the task, they click a button
Code:
-(IBAction) fncTaskCompleted:(id)sender
{
[self.view removeFromSuperview];
At here
I Would like to Update my FirstView variable: arrTaskList
And
Refresh FirstView
}
i not able to use the below method because the xcode told me it will not response to the delegate method...
FirstView *delegate = (FirstView*)[UIApplication shareApplication] delegate];
[delegate.arrTaskList removeObject:0];
can anyone guide me a direction on how to accomplish this?
thank you...