Skip to content

Instantly share code, notes, and snippets.

@lattejed
Created May 26, 2014 08:39
Show Gist options
  • Select an option

  • Save lattejed/8a4286091dc7ac234db2 to your computer and use it in GitHub Desktop.

Select an option

Save lattejed/8a4286091dc7ac234db2 to your computer and use it in GitHub Desktop.
//
// Model.h
//
// Created by Matthew Smith on 5/21/14.
// Copyright (c) 2014 LatteJed. All rights reserved.
//
static NSString* const kNotificationURLDidUpdate = @"kNotificationURLDidUpdate";
@interface Model : NSObject
@property (nonatomic, copy) NSURL* url;
@end
//
// Model.m
//
// Created by Matthew Smith on 5/21/14.
// Copyright (c) 2014 LatteJed. All rights reserved.
//
#import "Model.h"
@implementation Model
- (void)setUrl:(NSURL *)url;
{
_url = url;
[[NSNotificationCenter defaultCenter] postNotificationName:kNotificationURLDidUpdate
object:self];
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment