Q:

Want custom cell to update outlet, using data from its delegate

Context:
I'm putting together something slightly convoluted.
I have a selection of custom table cells designed in a single XIB file, each a belonging to MyCustomCell class. These cells contain Label outlets, as well as things like steppers and sliders which let the user change the properties that drive the outlets.
Example cell: http://s29.postimg.org/fi15mfn8n/nib.png
These cells are loaded into an UITableView elsewhere in my project, which in turn sits in a UIViewController. (The reason I am keeping the cell nibs separate from the view they get loaded into is to preserve easy customizability, since this table view needs to contain different cells depending on options the user has previously selected.)
These properties (e.g. the date property) are held by the UIViewController. When the stepper is tapped, the UIViewController updates its date property via a delegate system I have implemented.
Questions:
My problem is then getting the properties back out of the UIViewController and into the Label outlets in the custom cells. How can I do that?

A:

For anyone attempting something similar (multiple views and tableviewcells passing data around), I decided to use a Singleton. It's a separate class instance to host the data, accessible and modifiable by any other class:
DataSingleton.h
#import <Foundation/Foundation.h>

@interface DataSingleton : NSObject

+(instancetype) sharedInstance;

@property (strong, nonatomic) NSDate *dataItem1;
@property (strong, nonatomic) NSNumber *dataItem2;
@property (strong, nonatomic) NSNumber *dataItem3;

@end

DataSingleton.m
#import "DataSingleton.h"

@implementation DataSingleton

// Singleton boilerplate
+(instancetype) sharedInstance
{
    static DataSingleton *instance = nil;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        instance = [[self alloc] init];
    });

    return  instance;
}

@end

And then any other class can access and modify this single-instance dataset as follows
NSDate *date = [DataSingleton sharedInstance].dataItem1

Hope this helps anyone else playing around with 'global' data.

