Created
April 17, 2012 21:52
-
-
Save nwg/2409305 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// SampleEntityLoader.h | |
// SocializeSDK | |
// | |
// Created by Nathaniel Griswold on 1/11/12. | |
// Copyright (c) 2012 Socialize, Inc. All rights reserved. | |
// | |
#import <UIKit/UIKit.h> | |
#import <Socialize/Socialize.h> | |
@interface SampleEntityLoader : UIViewController | |
@property (nonatomic, retain) IBOutlet UILabel *entityNameLabel; | |
@property (nonatomic, retain) IBOutlet UILabel *entityKeyLabel; | |
@property (nonatomic, retain) id<SocializeEntity> entity; | |
- (id)initWithEntity:(id<SocializeEntity>)entity; | |
@end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "SampleEntityLoader.h" | |
@implementation SampleEntityLoader | |
@synthesize entity = entity_; | |
@synthesize entityNameLabel = entityNameLabel_; | |
@synthesize entityKeyLabel = entityKeyLabel_; | |
- (id)initWithEntity:(id<SocializeEntity>)entity | |
{ | |
self = [super init]; | |
if (self) { | |
self.entity = entity; | |
} | |
return self; | |
} | |
- (void)viewDidLoad | |
{ | |
[super viewDidLoad]; | |
self.entityKeyLabel.text = self.entity.key; | |
self.entityNameLabel.text = self.entity.name; | |
self.title = self.entity.name; | |
} | |
- (void)viewDidUnload | |
{ | |
[super viewDidUnload]; | |
// Release any retained subviews of the main view. | |
// e.g. self.myOutlet = nil; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment