Skip to content

Instantly share code, notes, and snippets.

@bobspryn
Last active August 29, 2015 14:08
Show Gist options
  • Save bobspryn/cead1f81935f18b2acb5 to your computer and use it in GitHub Desktop.
Save bobspryn/cead1f81935f18b2acb5 to your computer and use it in GitHub Desktop.
- (id) initWithViewModel:(MYTwitterLookupViewModel *) viewModel {
self = [super init];
if (!self) return nil;
_viewModel = viewModel;
return self;
}
- (void) viewDidLoad {
[super viewDidLoad];
_goButton.enabled = viewModel.isUsernameValid;
_goButton.alpha = viewModel.isUsernameValid ? 1 : 0.5;
// etc
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment